Worried about your symptoms?
Start the test with our free AI Symptom Checker.
This will help us personalize your assessment.
By starting the symptom checker, you agree to the Privacy Policy and Terms of Use
Try one of these related symptoms.
Muscle cramps
Cramps in my feet
Spasming of the muscles in my feet
Leg cramps are episodes of sudden pain in the muscles of the leg caused by an involuntary contracting (shortening) of the leg muscle.
Seek professional care if you experience any of the following symptoms
Generally, Calf cramp (Charley Horse) can be related to:
Leg cramps are episodes of sudden pain in leg muscles caused by involuntary contractions (shortening) of the leg muscle. Most leg cramps happen in the calf muscles and, less commonly, in the feet and thighs.
Tetany is a condition involving involuntary muscle contractions and overly stimulated peripheral nerves. It is caused by electrolyte imbalances, most often low blood calcium levels.
Diabetic neuropathy is a kind of nerve damage that can happen in people with long-term diabetes. High blood sugar can harm nerves all over the body, mainly in the legs and feet.
Muscle Cramps of All 4 Limbs
Sometimes, Calf cramp (Charley Horse) may be related to these serious diseases:
This is a life-threatening emergency where the person's body temperature is dangerously high and they display neurological abnormalities. This occurs when the body fails to regulate its temperature properly. It can be caused by the surrounding environment (heat, moisture) or internal factors (dehydration, strenuous exercise).
Your doctor may ask these questions to check for this symptom:
Reviewed By:
Unnati Patel, MD, MSc (Family Medicine)
Dr.Patel serves as Center Medical Director and a Primary Care Physician at Oak Street Health in Arizona. She graduated from the Zhejiang University School of Medicine prior to working in clinical research focused on preventive medicine at the University of Illinois and the University of Nevada. Dr. Patel earned her MSc in Global Health from Georgetown University, during which she worked with the WHO in Sierra Leone and Save the Children in Washington, D.C. She went on to complete her Family Medicine residency in Chicago at Norwegian American Hospital before completing a fellowship in Leadership in Value-based Care in conjunction with the Northwestern University Kellogg School of Management, where she earned her MBA. Dr. Patel’s interests include health tech and teaching medical students and she currently serves as Clinical Associate Professor at the University of Arizona School of Medicine.
Kent C Doan, MD (Orthopedics)
Dr Doan Graduated from the University of Missouri Kansas City School of Medicine and completed residency training in Orthopedic Surgery at the University of Colorado. He completed additional fellowship training in Orthopedic Sports Medicine at the prestigious Steadman Clinic and Steadman Philippon Research Institute in Vail, Colorado. He is a practicing Orthopedic Surgeon who specializes in complex and revision knee and shoulder surgery at the Kansas City Orthopedic Institute. He also holds an assistant professorship at the University of Kansas City.
Tomohiro Hamahata, MD (Orthopedics)
Dr. Hamahata graduated from the Jikei University of Medical Science. After working at Asanokawa General Hospital and Kosei Chuo Hospital, he joined the Department of Orthopedics at Asakusa Hospital in April 2021, specializing in general orthopedics and joint replacement surgery.
Content updated on Jan 29, 2025
Following the Medical Content Editorial Policy
Was this page helpful?
We would love to help them too.
With a free 3-min quiz, powered by Ubie's AI and doctors, find possible causes of your symptoms.
This questionnaire is customized to your situation and symptoms, including the following personal information:
Biological Sex - helps us provide relevant suggestions for male vs. female conditions.
Age - adjusts our guidance based on any age-related health factors.
History - considers past illnesses, surgeries, family history, and lifestyle choices.
Your symptoms

Our AI

Your report

Your personal report will tell you
✔ When to see a doctor
✔︎ What causes your symptoms
✔︎ Treatment information etc.
Q.
Magnesium Benefits for Women 65+: Sleep Better & Stop Leg Cramps
A.
Magnesium can help many women 65+ sleep better and cut nighttime leg cramps by calming the nervous system, supporting melatonin and GABA, and helping muscles relax. There are several factors to consider: aim for about 320 mg daily from food first, consider gentle forms like magnesium glycinate if needed, and check medicines and kidney or heart conditions because cramps and sleep issues can signal other problems; see below for food lists, supplement pros and cons, safety limits, and when to call a doctor.
References:
* Abbasi B, Mirzaei M, Mirzaei M. Magnesium and sleep: an update. J Basic Clin Physiol Pharmacol. 2021;32(6):639-645. doi: 10.1515/jbcpp-2021-0026. PMID: 34164287.
* Abbasi B, Mirzaei M, Mirzaei M. The effect of magnesium supplementation on primary insomnia in elderly: A double-blind placebo-controlled clinical trial. J Res Med Sci. 2012 Dec;17(12):1161-9. PMID: 23853625.
* Marshall NS, Spies JM, McGregor A. Magnesium for treating restless legs syndrome and nocturnal leg cramps: A systematic review. Sleep Med Rev. 2020 Aug;52:101309. doi: 10.1016/j.smrv.2020.101309. Epub 2020 Apr 18. PMID: 32669469.
* Sebo P, Herrmann FR, Haller DM. The effect of magnesium on nocturnal leg cramps: a systematic review and meta-analysis. Fam Pract. 2019 Sep 26;36(5):519-526. doi: 10.1093/fampra/cmz028. PMID: 31086259.
* Volpe SL. Magnesium: Its Role in Human Health and Contribution to Health Improvement of an Ageing Population. Curr Nutr Food Sci. 2019;15(4):307-313. doi: 10.2174/1573401315666190124160451. PMID: 31697285.
Q.
Naproxen for Women: Managing Cramps and Joint Pain
A.
Naproxen can effectively relieve menstrual cramps and joint or muscle pain in women by lowering prostaglandins and inflammation, offering longer-lasting relief than some alternatives when taken at the lowest effective dose with food. There are several factors to consider, including potential stomach, kidney, heart, and blood pressure risks, interactions with blood thinners, and pregnancy precautions, plus red flags like severe pelvic pain, heavy or irregular bleeding, joint redness or fever, or black stools that need medical attention; see below for detailed dosing tips, who should use caution, and how it compares with ibuprofen and acetaminophen.
References:
* Kriplani A, et al. Non-steroidal anti-inflammatory drugs for heavy menstrual bleeding. Cochrane Database Syst Rev. 2019 Jan 23;1(1):CD000171. doi: 10.1002/14651858.CD000171.pub3. PMID: 30675704; PMCID: PMC6353278.
* Du W, et al. Comparison of the efficacy and safety of different non-steroidal anti-inflammatory drugs for the treatment of primary dysmenorrhea: A systematic review and network meta-analysis. J Clin Pharm Ther. 2020 Apr;45(2):206-218. doi: 10.1111/jcpt.13063. Epub 2020 Jan 29. PMID: 32011746.
* Lanza FL. Efficacy and safety of naproxen and fixed-dose combinations of naproxen and esomeprazole in patients with osteoarthritis: A review. Clin Ther. 2016 May;38(5):1073-89. doi: 10.1016/j.clinthera.2016.03.012. Epub 2016 Apr 8. PMID: 27063469.
* Lee YH, et al. Nonsteroidal Anti-Inflammatory Drugs for Knee and Hip Osteoarthritis: A Systematic Review of Efficacy and Safety. J Clin Rheumatol. 2017 Dec;23(8):441-447. doi: 10.1097/RHU.0000000000000595. PMID: 28609322.
* Rovira-Vilá F, et al. NSAID use for musculoskeletal pain in women with high cardiovascular risk: how to balance risk and benefit? Int J Rheum Dis. 2018 Sep;21 Suppl 1:11-15. doi: 10.1111/1756-185X.13322. PMID: 29873738.
Q.
Naproxen Over 65: Protecting Your Stomach & Kidneys
A.
If you are over 65 and taking naproxen, your risk of stomach ulcers or bleeding and kidney problems is higher; protect yourself by using the lowest effective dose for the shortest time, taking it with food, staying hydrated, and avoiding interacting drugs, and seek urgent care for black stools, vomiting blood, sudden swelling, or very low urine. There are several factors to consider that can change your next steps, including your other conditions, medication list, and options like acetaminophen or topical treatments; important monitoring and safety details are explained below.
References:
* Kincaid, C. A., & Goldberg, M. J. (2012). Gastrointestinal and renal toxicity of non-steroidal anti-inflammatory drugs (NSAIDs) in the elderly. *Drugs & Aging*, *29*(4), 283–291.
* Kim, A. I., Shah, P., & Singh, B. B. (2021). Acute Kidney Injury From Non-Steroidal Anti-Inflammatory Drugs (NSAIDs): A Systematic Review and Meta-Analysis. *Current Drug Safety*, *16*(2), 170–184.
* Laine, L. (2014). Strategies to minimize gastrointestinal toxicity from nonsteroidal anti-inflammatory drugs: a comprehensive review. *The American Journal of Gastroenterology*, *109*(6), 754–767.
* Veres, G., Lőrincz, A., Sipos, Z., & Pados, G. (2023). The safety of non-steroidal anti-inflammatory drugs in older adults: An updated narrative review. *Frontiers in Pharmacology*, *14*, 1247065.
* American Geriatrics Society Panel on the Pharmacological Management of Persistent Pain in Older Persons. (2019). Management of pain in older adults: A comprehensive review. *Journal of the American Geriatrics Society*, *67*(1), 133–154.
Q.
What foods can help prevent leg cramps? How about vitamins?
A.
Leg cramps, particularly nocturnal leg cramps, can be uncomfortable and disruptive. While the exact causes of leg cramps can vary, certain dietary choices and vitamins may help prevent them.
References:
Hooper Marosek SE, Antharam V, Dowlatshahi K. Quantitative Analysis of the Acetic Acid Content in Substances Used by Athletes for the Possible Prevention and Alleviation of Exercise-Associated Muscle Cramps. J Strength Cond Res. 2020 Jun;34(6):1539-1546. doi: 10.1519/JSC.0000000000003595. PMID: 32459412.
Maughan RJ, Shirreffs SM. Muscle Cramping During Exercise: Causes, Solutions, and Questions Remaining. Sports Med. 2019 Dec;49(Suppl 2):115-124. doi: 10.1007/s40279-019-01162-1. PMID: 31696455; PMCID: PMC6901412.
Tan J, Zhu R, Li Y, Wang L, Liao S, Cheng L, Mao L, Jing D. Vitamin K2 in Managing Nocturnal Leg Cramps: A Randomized Clinical Trial. JAMA Intern Med. 2024 Dec 1;184(12):1443-1447. doi: 10.1001/jamainternmed.2024.5726. PMID: 39466236; PMCID: PMC11581596.
Q.
What are some home remedies to stop leg cramps immediately?
A.
If you experience leg cramps, there are several effective home remedies you can try to relieve the discomfort immediately. These remedies can help relax the muscles and alleviate the cramping sensation.
References:
Riley JD, Antony SJ. Leg cramps: differential diagnosis and management. Am Fam Physician. 1995 Nov 1;52(6):1794-8. PMID: 7484689.
Allen RE, Kirby KA. Nocturnal leg cramps. Am Fam Physician. 2012 Aug 15;86(4):350-5. PMID: 22963024.
Mitsikostas, D. D., Thomas, A. M., & Gatzonis, S. D. (2010). The pathophysiology of medication overuse headache: The ‘neurochemical’ hypothesis revisited. ](https://doi.org/10.1212/WNL.0b013e3181d0ccca)[_Neurology, 74_](https://doi.org/10.1212/WNL.0b013e3181d0ccca)[(5), 398–399.
Q.
What are the causes of leg cramps at night?
A.
Leg cramps at night, also known as nocturnal leg cramps, can be caused by a variety of factors, including muscle fatigue, dehydration, electrolyte imbalances, and certain medical conditions. Understanding these causes can help in managing and preventing these painful episodes.
References:
Hallegraeff J, de Greef M, Krijnen W, van der Schans C. Criteria in diagnosing nocturnal leg cramps: a systematic review. BMC Fam Pract. 2017 Feb 28;18(1):29. doi: 10.1186/s12875-017-0600-x. PMID: 28241802; PMCID: PMC5330021.
Monderer RS, Wu WP, Thorpy MJ. Nocturnal leg cramps. Curr Neurol Neurosci Rep. 2010 Jan;10(1):53-9. doi: 10.1007/s11910-009-0079-5. PMID: 20425227.
Allen RE, Kirby KA. Nocturnal leg cramps. Am Fam Physician. 2012 Aug 15;86(4):350-5. PMID: 22963024.
Q.
What are the side effects of kampo medicine?
A.
Kampo medicine, a traditional Japanese form of herbal medicine, can have side effects, similar to other forms of herbal and traditional medicine. While many people use Kampo for its therapeutic benefits, it is important to be aware of potential adverse effects, which can vary depending on the specific formulation and individual patient factors.
References:
Yu F, Takahashi T, Moriya J, Kawaura K, Yamakawa J, Kusaka K, Itoh T, Morimoto S, Yamaguchi N, Kanda T. Traditional Chinese medicine and Kampo: a review from the distant past for the future. J Int Med Res. 2006 May-Jun;34(3):231-9. doi: 10.1177/147323000603400301. PMID: 16866016.
Dai Z, Liao X, Wieland LS, Hu J, Wang Y, Kim TH, Liu JP, Zhan S, Robinson N. Cochrane systematic reviews on traditional Chinese medicine: What matters-the quantity or quality of evidence? Phytomedicine. 2022 Apr;98:153921. doi: 10.1016/j.phymed.2021.153921. Epub 2022 Jan 10. PMID: 35104758; PMCID: PMC9741948.
Q.
What is the best drink to prevent muscle cramps? Are sports drinks effective for this?
A.
To prevent muscle cramps, the best drinks are those that help maintain hydration and replenish electrolytes. Sports drinks can be effective for this purpose, especially during prolonged exercise or in hot conditions, as they contain essential electrolytes like sodium and potassium. However, they also may contain quite a bit of extra sugar and calories as well.
References:
Earp JE, Stearns RL, Stranieri A, Agostinucci J, Lepley AS, Matson T, Ward-Ritacco CL. Electrolyte beverage consumption alters electrically induced cramping threshold. Muscle Nerve. 2019 Nov;60(5):598-603. doi: 10.1002/mus.26650. Epub 2019 Aug 12. PMID: 31350753.
Jung AP, Bishop PA, Al-Nawwas A, Dale RB. Influence of Hydration and Electrolyte Supplementation on Incidence and Time to Onset of Exercise-Associated Muscle Cramps. J Athl Train. 2005 Jun;40(2):71-75. PMID: 15970952; PMCID: PMC1150229.
Hooper Marosek SE, Antharam V, Dowlatshahi K. Quantitative Analysis of the Acetic Acid Content in Substances Used by Athletes for the Possible Prevention and Alleviation of Exercise-Associated Muscle Cramps. J Strength Cond Res. 2020 Jun;34(6):1539-1546. doi: 10.1519/JSC.0000000000003595. PMID: 32459412.
Q.
Why do I get leg cramps when I stretch in bed?
A.
Leg cramps during stretching in bed, often referred to as nocturnal leg cramps, can occur due to several factors, including muscle fatigue, dehydration, electrolyte imbalances, and certain medical conditions. Understanding these causes can help in managing and preventing cramps.
References:
Allen RE, Kirby KA. Nocturnal leg cramps. Am Fam Physician. 2012 Aug 15;86(4):350-5. PMID: 22963024.
Brown TM. Sleep-Related Leg Cramps: A Review and Suggestions for Future Research. Sleep Med Clin. 2015 Sep;10(3):385-92, xvi. doi: 10.1016/j.jsmc.2015.05.002. Epub 2015 Jun 14. PMID: 26329449.
Monderer RS, Wu WP, Thorpy MJ. Nocturnal leg cramps. Curr Neurol Neurosci Rep. 2010 Jan;10(1):53-9. doi: 10.1007/s11910-009-0079-5. PMID: 20425227.
Our symptom checker AI is continuously refined with input from experienced physicians, empowering them to make more accurate diagnoses.

“World’s Best Digital
Health Companies”
Newsweek 2024

“Best With AI”
Google Play Best of 2023

“Best in Class”
Digital Health Awards 2023 (Quarterfinalist)

Which is the best Symptom Checker?
Ubie’s symptom checker demonstrated a Top-10 hit accuracy of 71.6%, surpassing the performance of several leading symptom checkers in the market, which averaged around 60% accuracy in similar assessments.
Link to full study:
https://www.medrxiv.org/content/10.1101/2024.08.29.24312810v1Charley Horse - WebMD
https://www.webmd.com/pain-management/muscle-spasms-cramps-charley-horse