MagnesiumtoMuscle Cramps(moderate evidence)
    Condition
    Moderate Evidence
    Effectiveness 2/5

    Magnesium for Muscle Cramps

    Cochrane found magnesium unlikely to help idiopathic cramps in older adults, though pregnancy trials are more encouraging.

    Overview

    Verdict

    Mixed evidence

    For the most common kind of cramp, night-time calf cramps in middle and older age, magnesium works no better than placebo; a Cochrane review and a 2026 trial agree. In pregnancy, small trials genuinely conflict, so it is something to discuss with your midwife or obstetrician rather than a proven fix.

    The honest headline

    Magnesium is the supplement most often taken for muscle cramps, but for idiopathic night cramps in older adults it does not beat placebo. A 2020 Cochrane review found a difference of just 0.18 cramps a week (95% CI -0.84 to 0.49; 5 trials, 307 people; moderate-certainty evidence) [1]. A 2026 Finnish trial in 121 adults aged 50-85 again found no effect of magnesium, while knee-high compression stockings did reduce cramps [2].

    Pregnancy is the one setting where the question is still open. Two double-blind trials found less cramp distress or frequency with magnesium [3, 4], two others found no difference [5, 6], and two meta-analyses of largely the same trials reached opposite conclusions [7, 8]. No randomised trial has tested magnesium for exercise cramps [1].

    Who this is and isn't for

    Not worth buying for routine night-time calf cramps in middle or older age: the trials are consistently null. Possibly worth discussing with your midwife or obstetrician for leg cramps in pregnancy, where the evidence conflicts. A proven low magnesium level, for example after long-term proton pump inhibitors or loop or thiazide diuretics, is a different situation that needs testing and treating in its own right [9].

    At a glance

    Verdict
    Mixed: no benefit for idiopathic night cramps; conflicting in pregnancy
    Evidence
    Moderate: Cochrane review of 11 RCTs plus later trials
    Dose studied
    226-360 mg elemental magnesium a day
    Time to judge
    3-4 weeks, the length of most trials
    Better-supported option
    Compression stockings (one 2026 RCT in adults 50-85)
    Main side effect
    Diarrhoea and stomach upset

    Check your diet first: our guide to magnesium-rich foods shows which foods supply the most.

    How It Works

    The theory

    Magnesium is thought to damp neuromuscular excitability, which is why it is marketed for cramps [8]. Pregnancy adds a plausible reason: in one trial, serum magnesium in women with leg cramps sat at or below the lower reference limit, as it often does in healthy pregnancy [3].

    Low magnesium is also common in some medical settings. Between 10% and 20% of people on haemodialysis have serum magnesium below 0.7 mmol/L, and it is one suspected contributor to their cramps [10]. Long-term proton pump inhibitors and loop or thiazide diuretics can lower magnesium too [9].

    What the mechanism can't tell you

    Most cramps don't seem to come from low magnesium. A primary-care review concluded that night cramps are probably caused by muscle fatigue and nerve dysfunction rather than electrolyte abnormalities [11]. Giving magnesium straight into a vein for 5 days, which bypasses poor gut absorption, still did not reduce cramps in older adults, and how much magnesium the body retained did not predict who improved [12].

    In endurance athletes, people who cramped had higher, not lower, post-race serum magnesium (limited evidence) [13]. In two pregnancy trials, oral magnesium raised urinary magnesium but not serum levels [3, 5], so a blood test is a poor guide to who might respond.

    Proposed mechanisms

    Damps nerve excitability
    Corrects pregnancy-related low levels
    Corrects drug-induced deficiency
    Placebo effect (likely)

    Dosing & Protocol

    Doses used in the trials

    Oral trials used 226-360 mg of elemental magnesium a day for 2 to 9 weeks: 300 mg as citrate [14, 6], 300 mg as bisglycinate [4], 360 mg as lactate plus citrate [5] and 226 mg as magnesium oxide monohydrate [15]. Night-cramp trials gave the dose at bedtime [16, 15].

    The tolerable upper intake level for magnesium from supplements is 350 mg a day for adults, so the highest trial dose sits just above it [9]. No trial compared forms head to head; positive and null results came from citrate, bisglycinate and oxide alike [14, 4, 16, 6]. Carbonate, chloride, gluconate and oxide are the forms most often reported to cause diarrhoea [9].

    Dose by situation

    SituationDoseFormNotes
    Leg cramps in pregnancy300 mg/dayCitrate or bisglycinateOnly with your midwife's or obstetrician's agreement; trials conflict
    Night cramps, age 50+Not recommended-Consistently no better than placebo
    Exercise-associated crampsUntested-No randomised magnesium trials
    Proven low magnesiumAs prescribed-Treat the cause with your clinician

    The 300 mg doses come from the pregnancy trials [4, 6]; the adult upper limit for supplemental magnesium is 350 mg a day [9].

    How to try it (pregnancy, with your clinician's agreement)

    1. 1

      Count cramps for two weeks first· Before starting

      Trials counted cramps per week before treatment. Without a baseline you can't tell a real change from the usual ups and downs.

    2. 2

      Take 300 mg in the evening· Weeks 1-4

      Citrate or bisglycinate, as in the pregnancy trials, staying within the 350 mg supplemental limit [9].

    3. 3

      Judge at four weeks· Week 4

      Most pregnancy trials, positive and null, ran 3-4 weeks [3, 4, 6]. If cramps are no less frequent than your baseline, stop.

    Expect improvement either way

    In the JAMA Internal Medicine trial, cramps fell by about 3 a week on placebo as well as on magnesium [16]. In a 2020 pregnancy trial, cramps eased in 32.8% of the placebo group [6]. Feeling better on a supplement is not proof that it worked.

    Wondering whether citrate or glycinate works better for cramps? Our magnesium glycinate vs citrate comparison sets out what the trials found.

    Not sure when to take it? See our guide on when to take magnesium for timing with meals and other supplements.

    Evidence

    Night cramps in older adults: consistently null

    The 2020 Cochrane review included 11 trials with 735 people. For idiopathic cramps, mostly in adults with a mean age of 61.6 to 69.3, magnesium made no significant difference to cramp frequency, intensity or duration. The share of people whose cramp rate fell by 25% or more was the same (RR 1.04, 95% CI 0.84 to 1.29; high-certainty evidence) [1].

    In 94 adults (mean age 64.9), cramps fell by 3.41 a week on magnesium oxide and by 3.03 on placebo (P = .67) [16]. Intravenous magnesium did no better (-2.4 vs -1.7 cramps a week, P = .51) [12]. The 2026 three-arm trial found no magnesium effect (adjusted difference -0.20 cramps a week, 95% CI -1.49 to 1.09), while compression stockings cut cramps by 1.43 a week (P = .001) [2].

    The positive-looking outliers

    A 2002 crossover trial in 46 people found a trend toward fewer cramps on 300 mg magnesium citrate (P = .07), alongside a strong period effect that makes crossover results hard to read [14]. A 2021 Ukrainian trial with 175 completers found a slightly larger drop with magnesium oxide monohydrate than placebo (-3.4 vs -2.6 episodes, P = .01), but it was registered retrospectively and tested one product [15].

    A 2014 meta-analysis of 7 trials concluded that magnesium does not appear effective for night cramps in the general population [17]. In a Swiss population cohort, people taking magnesium supplements had a higher incidence of night cramps; that is an observational finding and can't show cause and effect [18].

    Pregnancy: genuinely conflicting

    Two trials were positive. In 73 women, 3 weeks of magnesium reduced cramp distress compared with placebo (P < .05) [3]. In 86 women, a 50% cut in cramp frequency was more common with 300 mg magnesium bisglycinate (86.0% vs 60.5%, P = .007) [4]. Two were null: 360 mg for 2 weeks in 38 women [5] and 300 mg citrate for 4 weeks in 130 women [6].

    A 2021 meta-analysis of 4 RCTs (332 women) found no reduction in cramp frequency (WMD -0.47, 95% CI -1.14 to 0.20) [7]. A 2026 meta-analysis of 4 trials (about 364 women) reported a benefit (pooled RR 1.35, 95% CI 1.05 to 1.74) [8]. The Cochrane pregnancy review rated the evidence low or very low certainty and could not pool it [19], and the magnesium review judged all five pregnancy trials at high risk of bias [1].

    What's missing

    No randomised trial has tested magnesium for exercise-associated cramps or for cramps in motor neuron disease, and the one small cirrhosis trial was inconclusive [1]. For cramps during exercise, sodium-based drinks are the better-studied question; see electrolytes for muscle cramps.

    In haemodialysis, raising dialysate magnesium looks promising, but the evidence comes mostly from non-randomised before-and-after studies, and it is a decision for the dialysis unit rather than a supplement question [10]. Pregnancy trials are small, short and measured cramps in ways that can't be combined [19].

    Evidence scorecard

    Idiopathic night cramps (older adults)
    No benefit; moderate to high certainty
    Leg cramps in pregnancy
    Conflicting; low or very low certainty
    Exercise-associated cramps
    No randomised trials
    Cirrhosis or dialysis cramps
    Too little data
    Size of the evidence
    11 RCTs, 735 people (Cochrane 2020)
    Risk of bias
    High in all 5 pregnancy trials

    Trials, meta-analyses and reviews of magnesium for muscle cramps, including the null and conflicting results.

    Randomised, cross-over, placebo controlled trial of magnesium citrate in the treatment of chronic persistent leg cramps

    Score: 6/10
    2002
    crossover
    n=46

    Roffe C, Sills S, Crome P +1 more

    There was a trend towards less cramps on magnesium (p=0.07)

    View source

    Interventions for leg cramps in pregnancy

    Score: 8/10
    2020
    systematic_review
    n=576

    Luo L, et al

    Across 8 trials (576 women), oral magnesium may reduce leg cramp frequency versus placebo in some trials but results were inconsistent; oral calcium showed no clear benefit; vitamin B complex and vitamin C evidence was very low certainty. No intervention was supported by high-quality evidence.

    View source

    Muscle cramps and magnesium deficiency: case reports

    Score: 2/10
    1996n=2

    Bilbey DL, Prabhakaran VM

    Both patients presented with persistent, severe muscle cramps and pain attributable to documented magnesium deficiency, and symptoms resolved following magnesium repletion. The authors argue magnesium deficiency is more common than generally recognised and is often missed because serum magnesium poorly reflects total body stores.

    View source

    Does oral magnesium substitution relieve pregnancy-induced leg cramps?

    Score: 5/10
    2008
    rct
    n=38

    Nygaard IH, Valbø A, Pethick SV +1 more

    No significant effect on frequency or intensity of leg cramps in pregnant women

    View source

    Effect of oral magnesium supplementation for relieving leg cramps during pregnancy: A meta-analysis of randomized controlled trials

    Score: 7/10
    2021
    meta_analysis
    n=332

    Liu J, Song G, Zhao G +1 more

    Oral magnesium supplementation is not effective in the treatment of leg cramps during pregnancy

    View source

    The Role of Electrolytes in Muscle Pain Syndromes: A Systematic Review and Meta-Analysis With Implications for Temporomandibular Disorder

    Score: 6/10
    2026
    meta_analysis

    Patil S, Falkowski A, Venkataiah VS +3 more

    Magnesium supplementation benefits pregnancy-related cramps but shows inconsistent effects in other populations

    View source

    Effect of Magnesium Oxide Supplementation on Nocturnal Leg Cramps: A Randomized Clinical Trial

    Score: 8/10
    2017
    rct
    n=94

    Roguin Maor N, Alperin M, Shturman E +4 more

    Oral magnesium oxide was not superior to placebo for older adults experiencing NLC

    View source

    The effect of oral magnesium substitution on pregnancy-induced leg cramps

    Score: 6/10
    1995
    rct
    n=73

    Dahle LO, Berg G, Hammar M +2 more

    Oral magnesium substitution decreased leg cramp distress

    View source

    Effect of magnesium therapy on nocturnal leg cramps: a systematic review of randomized controlled trials with meta-analysis using simulations

    Score: 7/10
    2014
    meta_analysis
    n=361

    Sebo P, Cerutti B, Haller DM

    Magnesium therapy does not appear to be effective in the treatment of NLC in the general population

    View source

    Magnesium supplements, sleep quality, and nocturnal leg cramps: a combination of cross-sectional and prospective studies

    Score: 4/10
    2026
    cohort
    n=3887

    Stadie N, Heinzer R, Marques-Vidal P

    Magnesium supplementation did not prevent night cramps

    View source

    Oral magnesium for relief in pregnancy-induced leg cramps: a randomised controlled trial

    Score: 7/10
    2015
    rct
    n=86

    Supakatisant C, Phupong V

    oral magnesium supplement can improve the frequency and intensity of pregnancy-induced leg cramps

    View source

    Magnesium for skeletal muscle cramps

    Score: 9/10
    2020
    systematic_review
    n=735

    Garrison SR, et al.

    It is unlikely that magnesium supplementation provides clinically meaningful cramp prophylaxis to older adults experiencing skeletal muscle cramps.

    View source

    Secondary prevention of leg cramps using compression stockings or magnesium supplements: a three-arm randomized clinical trial

    Score: 8/10
    2026
    rct
    n=121

    Kuusipalo A, Laitila J, Lehtonen E +4 more

    No significant difference was observed between the magnesium and placebo groups

    View source

    The effect of magnesium infusion on rest cramps: randomized controlled trial

    Score: 7/10
    2011
    rct
    n=46

    Garrison SR, Birmingham CL, Koehler BE +2 more

    Intravenous magnesium infusion did not reduce the frequency of leg cramps

    View source

    Risk Factors for Exercise-Associated Muscle Cramps: A Systematic Review With Meta-Analysis

    Score: 7/10
    2026
    meta_analysis
    n=11274

    Costa LDS, Correa VAF, de Oliveira VF +3 more

    magnesium (limited evidence) concentrations were also observed in individuals with EAMC

    View source

    Oral magnesium supplementation for leg cramps in pregnancy-An observational controlled trial

    Score: 5/10
    2020
    rct
    n=132

    Araújo CAL, Lorena SB, Cavalcanti GCS +3 more

    Oral magnesium supplementation during pregnancy did not reduce the ocurrence and frequency of episodes of leg cramps

    View source

    A randomized, double-blind, placebo-controlled, multicenter study assessing the efficacy of magnesium oxide monohydrate in the treatment of nocturnal leg cramps

    Score: 6/10
    2021
    rct
    n=175

    Barna O, Lohoida P, Holovchenko Y +4 more

    indicating a higher decrease in the MOMH group as compared to the placebo group

    View source

    Safety

    Side effects at trial doses

    Magnesium was mostly well tolerated in the trials, but not side-effect free. Across the Cochrane trials, minor adverse events, mainly diarrhoea, were more common with magnesium (RR 1.51, 95% CI 0.98 to 2.33), affecting 11-37% of magnesium users against 10-14% on placebo; serious events did not differ [1].

    The kidneys clear excess magnesium, so the risk of toxicity rises when kidney function is impaired [9]. The pregnancy trials reported nausea and diarrhoea no more often than placebo [4, 6], but they were too small to assess outcomes for mother and baby [19].

    If you have kidney disease

    Don't take magnesium supplements for cramps without your kidney team's agreement: reduced kidney function lowers the body's ability to remove excess magnesium [9]. Cramps during dialysis are best raised with the dialysis unit [10].

    Check with your clinician first if you

    Have kidney disease
    Are pregnant
    Take bisphosphonates
    Take tetracyclines or quinolones
    Take diuretics or PPIs

    Interactions & Conflicts

    Medicines that matter

    Magnesium reduces the absorption of some medicines, and some medicines lower magnesium [9]. Several drugs are strongly associated with leg cramps, including intravenous iron sucrose, conjugated estrogens, raloxifene, naproxen and teriparatide, so a medication review may help more than a supplement [11]. Quinine is no longer recommended for leg cramps [11].

    Notable interactions

    Interacts withSeverityMechanismAction
    Bisphosphonates (alendronate)
    moderate
    Magnesium reduces their absorptionSeparate the doses by at least 2 hours
    Tetracycline and quinolone antibiotics (doxycycline, ciprofloxacin)
    moderate
    Magnesium reduces antibiotic absorptionTake the antibiotic 2 hours before or 4-6 hours after magnesium
    Potassium-sparing diuretics (amiloride, spironolactone)
    moderate
    Reduce magnesium excretionUse supplements only with your prescriber's agreement
    Loop and thiazide diuretics (furosemide, hydrochlorothiazide)
    low
    Increase magnesium loss in urineAsk whether your magnesium level should be checked
    Long-term proton pump inhibitors (esomeprazole, lansoprazole)
    low
    Can cause low magnesium, typically after more than a yearPeriodic magnesium checks, as the FDA advises

    References

    1. Garrison SR, et al. Magnesium for skeletal muscle cramps. Cochrane Database Syst Rev. 2020;9(9):CD009402.DOI: 10.1002/14651858.CD009402.pub3
    2. Kuusipalo A, et al. Secondary prevention of leg cramps using compression stockings or magnesium supplements: a three-arm randomized clinical trial. Trials. 2026;27(1).DOI: 10.1186/s13063-025-09370-z
    3. Dahle LO, et al. The effect of oral magnesium substitution on pregnancy-induced leg cramps. Am J Obstet Gynecol. 1995;173(1):175-80.DOI: 10.1016/0002-9378(95)90186-8
    4. Supakatisant C, et al. Oral magnesium for relief in pregnancy-induced leg cramps: a randomised controlled trial. Matern Child Nutr. 2015;11(2):139-45.DOI: 10.1111/j.1740-8709.2012.00440.x
    5. Nygaard IH, et al. Does oral magnesium substitution relieve pregnancy-induced leg cramps?. Eur J Obstet Gynecol Reprod Biol. 2008;141(1):23-6.DOI: 10.1016/j.ejogrb.2008.07.005
    6. Araújo CAL, et al. Oral magnesium supplementation for leg cramps in pregnancy-An observational controlled trial. PLoS One. 2020;15(1):e0227497.DOI: 10.1371/journal.pone.0227497
    7. Liu J, et al. Effect of oral magnesium supplementation for relieving leg cramps during pregnancy: A meta-analysis of randomized controlled trials. Taiwan J Obstet Gynecol. 2021;60(4):609-614.DOI: 10.1016/j.tjog.2021.05.006
    8. Patil S, et al. The Role of Electrolytes in Muscle Pain Syndromes: A Systematic Review and Meta-Analysis With Implications for Temporomandibular Disorder. Int Dent J. 2026;76(3):109488.DOI: 10.1016/j.identj.2026.109488
    9. Office of Dietary Supplements, National Institutes of Health. Magnesium: Fact Sheet for Health Professionals. Accessed 13 October 2026.
    10. Varghese A, et al. A Higher Concentration of Dialysate Magnesium to Reduce the Frequency of Muscle Cramps: A Narrative Review. Can J Kidney Health Dis. 2020;7:2054358120964078.DOI: 10.1177/2054358120964078
    11. Allen RE, et al. Nocturnal leg cramps. Am Fam Physician. 2012;86(4):350-5.
    12. Garrison SR, et al. The effect of magnesium infusion on rest cramps: randomized controlled trial. J Gerontol A Biol Sci Med Sci. 2011;66(6):661-6.DOI: 10.1093/gerona/glq232
    13. Costa LDS, et al. Risk Factors for Exercise-Associated Muscle Cramps: A Systematic Review With Meta-Analysis. Muscle Nerve. 2026;74(5):1375-1386.DOI: 10.1002/mus.70389
    14. Roffe C, et al. Randomised, cross-over, placebo controlled trial of magnesium citrate in the treatment of chronic persistent leg cramps. Med Sci Monit. 2002;8(5):CR326-30.
    15. Barna O, et al. A randomized, double-blind, placebo-controlled, multicenter study assessing the efficacy of magnesium oxide monohydrate in the treatment of nocturnal leg cramps. Nutr J. 2021;20(1):90.DOI: 10.1186/s12937-021-00747-9
    16. Roguin Maor N, et al. Effect of Magnesium Oxide Supplementation on Nocturnal Leg Cramps: A Randomized Clinical Trial. JAMA Intern Med. 2017;177(5):617-623.DOI: 10.1001/jamainternmed.2016.9261
    17. Sebo P, et al. Effect of magnesium therapy on nocturnal leg cramps: a systematic review of randomized controlled trials with meta-analysis using simulations. Fam Pract. 2014;31(1):7-19.DOI: 10.1093/fampra/cmt065
    18. Stadie N, et al. Magnesium supplements, sleep quality, and nocturnal leg cramps: a combination of cross-sectional and prospective studies. Eur J Nutr. 2026;65(2):60.DOI: 10.1007/s00394-026-03910-2
    19. Luo L, et al. Interventions for leg cramps in pregnancy. Cochrane Database Syst Rev. 2020;12(12):CD010655.DOI: 10.1002/14651858.CD010655.pub3

    Frequently Asked Questions

    Does magnesium help leg cramps at night?
    Not for most adults. In older adults with idiopathic night cramps, a Cochrane review and a 2026 trial found magnesium no better than placebo [1, 2]. Cramps often ease while taking it, but they ease just as much on placebo [16].
    Is magnesium safe for leg cramps in pregnancy?
    The pregnancy trials found no more nausea or diarrhoea than placebo [4, 6], but they were too small to assess outcomes for mother and baby [19]. Whether it helps is genuinely unsettled, so agree it with your midwife or obstetrician first.
    Which form of magnesium is best for cramps?
    No trial has compared forms. Positive and null results came from citrate, bisglycinate and oxide alike [14, 4, 16, 6]. If you do try it, oxide, carbonate, chloride and gluconate are the forms most often linked to diarrhoea [9].
    What works better than magnesium for night cramps?
    In a 2026 trial in adults aged 50-85, knee-high compression stockings reduced cramps by about 1.4 a week compared with placebo; magnesium did not [2]. A medication review is worth doing, and quinine is no longer recommended [11].
    Can low magnesium cause muscle cramps?
    Low magnesium is one suspected contributor in some settings, such as haemodialysis [10], and long-term proton pump inhibitors or diuretics can lower levels [9]. A blood test ordered by your clinician, not a trial of supplements, is the way to find out.
    Do electrolyte drinks stop cramps instead?
    That is a separate question about sodium-based drinks, mainly for exercise cramps, covered on our electrolytes for muscle cramps page. Magnesium itself has never been tested in a randomised trial for exercise cramps [1].

    Medical Disclaimer

    The information provided on this website is for educational and informational purposes only and is not intended as a substitute for professional medical advice, diagnosis, or treatment. Always seek the advice of your physician or other qualified health provider with any questions you may have regarding a medical condition or before starting any supplement regimen.

    Individual results may vary. The statements on this website have not been evaluated by the Food and Drug Administration. Products and information are not intended to diagnose, treat, cure, or prevent any disease.