Does magnesium help with leg cramps?
For the night leg cramps that older adults get, no. A Cochrane review of 5 trials in 307 people, mostly in their sixties, found magnesium changed the number of cramps by 0.18 a week against placebo after four weeks (95% CI -0.84 to 0.49), on moderate certainty evidence. In pregnancy the reviews disagree. For cramps during or after exercise nobody has run a randomized trial.
Myth. Magnesium does not reduce idiopathic night leg cramps in older adults. The share of people whose cramps fell by at least a quarter was the same on magnesium and placebo (risk ratio 1.04, 95% CI 0.84 to 1.29, 3 trials, 177 people), and the Cochrane review rated that finding high certainty. Three placebo-controlled trials, with tablets and with infusions straight into a vein, found the same, the latest in 2026.
Both trials found cramps fell in both groups, and the gap between magnesium and placebo was not significant (difference 0.38 a week in the first trial, P = .67). The bars show averages without intervals, because the abstracts report the gap rather than an interval for each arm. Sources: cards ev-mgcr-09 and 11 below.
What the trials found
Night cramps in older adults
The Cochrane review measured its main outcome as the percentage change in weekly cramps at four weeks. Magnesium came out 9.59 percent ahead of placebo, with an interval from 23.14 percent ahead to 3.97 percent behind, across 3 trials and 177 people. That does not reach significance. An earlier meta-analysis of 7 trials in 361 adults reached the same view: magnesium does not appear effective for night cramps in the general population.
The single trials explain why so many people believe it works. In a trial of 94 adults published in JAMA Internal Medicine, four weeks of magnesium oxide cut cramps by 3.41 a week. Placebo cut them by 3.03. In 46 older adults given five days of magnesium infusions, cramps fell by 2.4 a week against 1.7 on placebo (P = .51). Giving magnesium into a vein tests whether poor absorption from the gut is why tablets fail, and it did not help either. A 2026 trial in 121 adults aged 50 to 85 in Finland found no difference between magnesium and placebo (adjusted difference -0.20 cramps a week, 95% CI -1.49 to 1.09). In the same trial, compression stockings did reduce cramps, although stockings cannot be hidden from the wearer.
Above 1 means more of that outcome on magnesium. The first row is high certainty and sits on 1. The pregnancy row comes from one of two reviews that disagree. The side effect row is low certainty and its interval touches 1. Sources: cards ev-mgcr-02, 03 and 06 below.
A Swiss population cohort points the same way from observational data. People already taking magnesium supplements had a higher incidence of night cramps later. The likeliest reading is that people with cramps take magnesium, and the abstract gives no effect size.
Pregnancy
Unsettled. Here the evidence splits, and the split depends on which trials are pooled and how cramps were counted. A meta-analysis of 4 trials in 332 pregnant women found magnesium did not lower how often cramps occurred (difference -0.47 a week, 95% CI -1.14 to 0.20). A 2026 meta-analysis of 4 trials in about 364 women found the opposite, a risk ratio of 1.35 (95% CI 1.05 to 1.74) for fewer cramps. It gives no baseline rate, so the gain cannot be stated per 100 women. The Cochrane review of 8 small trials in 576 pregnant women could not pool them and rated the evidence low to very low certainty.
The single trials in pregnancy point both ways. In 80 pregnant women at 14 to 34 weeks, 300 mg of magnesium bisglycinate a day for four weeks halved cramp frequency in 86.0 percent of women against 60.5 percent on placebo, in one center. In 132 women in the first trimester, 300 mg of magnesium citrate a day for four weeks did not reduce cramps.
Exercise cramps
The Cochrane review found no randomized trial of magnesium for cramps that come with exercise, or for cramps from diseases such as motor neurone disease. The one exception was a single small, inconclusive study in people with liver cirrhosis. Our own pass found nothing newer.
Who should be careful
Across the Cochrane trials, side effects were mostly in the gut, such as diarrhea, and reached between 11 and 37 percent of people on magnesium against 10 to 14 percent on control. The pooled risk ratio for minor side effects was 1.51 (95% CI 0.98 to 2.33, 4 trials, 254 people), on low certainty evidence, so that interval touches no difference.
Not for everyone. The NIH warns that the risk of magnesium toxicity rises with impaired kidney function or kidney failure, because the body loses its way to clear the excess. It gives no threshold. Anyone with kidney disease should treat magnesium tablets as a question for the person treating them.
The NIH sets the upper limit for magnesium from supplements and medicines at 350 mg a day for adults, and 65 to 350 mg for children and teenagers by age. Magnesium from food does not count toward it. The cramp trials used 226 to 360 mg of elemental magnesium, at or just above that limit.
What expert bodies say
We have no position from an expert body on magnesium for cramps. The NICE clinical summary on leg cramps and the 2016 WHO antenatal care guideline, which covers leg cramps in pregnancy, both refused our requests, and only secondary pages describe them. We do not report what secondary pages say they contain. The only body position on this page is the NIH upper limit above.
How we searched
Searched: a local copy of PubMed, queried on 6 October 2026 for magnesium with cramp, leg cramps or muscle cramps (92 hits, top 40 read by title, 14 abstracts read in full), and for cramp guidelines (5 hits, none about magnesium). We also searched the NIH Office of Dietary Supplements fact sheet, the local WHO layer (nothing on leg cramps) and Europe PMC for 2024 to 2026 titles (25 hits, two new and relevant, both already in our corpus). We searched the web for NICE and ACOG positions, and checked every source used in Retraction Watch. None was retracted.
Included: two Cochrane reviews, three other meta-analyses of randomized trials, five randomized trials, one population cohort and two NIH passages, cited below.
Excluded: earlier versions of both Cochrane reviews, which the current versions replace. Small trials already pooled in the Cochrane review. A positive trial in Ukraine of an industry product, registered after the fact and reporting only p-values. Reviews of magnesium for restless legs and for sleep, which answer different questions.
What we read: abstracts, with each quotation checked against the abstract text, and the NIH fact sheet sections.
What we could not get: the NICE clinical summary and the WHO antenatal guideline, both of which blocked access. We did not request the Cochrane full texts, because the abstracts carry the numbers used here.
What would change this answer
- A large trial in pregnancy with one agreed way of counting cramps. The two meta-analyses disagree because they pooled different trials and outcomes.
- Any randomized trial of magnesium for exercise-associated cramps. None exists, so the sports claim is untested.
- For older adults with night cramps, the answer is already backed by high certainty evidence on one outcome, and a 2026 trial agrees. Another small trial is unlikely to move it.
- Access to the NICE and WHO texts, which would give this page an expert position on cramps.
How much magnesium you need and where it comes from in food is in the magnesium guide. Whether it helps you sleep has its own evidence page.
The rest of the nutrient, in one place. Magnesium: widely under-eaten, and widely over-promised → What it does, how much you need, who runs short, and what too much does, with the evidence level shown on every line.
More questions about this food
- Does magnesium help with anxiety?
- Does magnesium improve athletic performance?
- Does magnesium lower blood pressure?
- Does magnesium lower blood sugar?
- Does magnesium help protect against osteoporosis?
- Does magnesium help with constipation?
- Does magnesium help with fatigue and low energy?
- Does magnesium help fertility and testosterone?
- Does magnesium help with hair loss?
- Does magnesium help with headaches and migraines?
The full guide
The same question for other foods (muscle cramps)
Sources
- ev-mgcr-01 · Meta-analysis or systematic review · Cochrane systematic review and meta-analysis of randomized trials · n = 307
This includes the primary endpoint, percentage change from baseline in the number of cramps per week at four weeks (mean difference (MD) -9.59%, 95% confidence interval (CI) -23.14% to 3.97%; 3 studies, 177 participants; moderate-certainty evidence); and the difference in the number of cramps per week at four weeks (MD -0.18 cramps/week, 95% CI -0.84 to 0.49; 5 studies, 307 participants; moderate-certainty evidence).
Who: people with idiopathic rest cramps, largely older adults (mean age 61.6 to 69.3 years) presumed to have nocturnal leg crampsEffect: cramps per week at 4 weeks MD -0.18 (95% CI -0.84 to 0.49; 5 studies, 307 participants; moderate certainty); % change from baseline MD -9.59% (-23.14% to 3.97%; 3 studies, 177 participants)Certainty: Moderate-certainty evidence; low heterogeneity (I2 0% to 12%); only one of five idiopathic-cramp trials at high risk of bias.Cochrane Database Syst Rev, 2020 · checked 2026-10-06 · we read the abstract - ev-mgcr-02 · Meta-analysis or systematic review · Cochrane systematic review and meta-analysis of randomized trials · n = 177
The percentage of individuals experiencing a 25% or better reduction in cramp rate from baseline was also no different (RR 1.04, 95% CI 0.84 to 1.29; 3 studies, 177 participants; high-certainty evidence).
Who: people with idiopathic rest cramps, largely older adultsEffect: 25% or better reduction in cramp rate RR 1.04 (95% CI 0.84 to 1.29; 3 studies, 177 participants; high certainty)Certainty: High-certainty evidence for this outcome.Cochrane Database Syst Rev, 2020 · checked 2026-10-06 · we read the abstract - ev-mgcr-03 · Meta-analysis or systematic review · Cochrane systematic review and meta-analysis of randomized trials · n = 254
Overall, oral magnesium was associated with mostly gastrointestinal adverse events (e.g. diarrhoea), experienced by 11% (10% in control) to 37% (14% in control) of participants.
Who: all trials of magnesium for skeletal muscle cramps pooled regardless of settingEffect: minor adverse events RR 1.51 (95% CI 0.98 to 2.33; 4 studies, 254 participants; low certainty); GI events 11% to 37% on magnesium vs 10% to 14% on control; major events 2/72 vs 3/68Certainty: Low-certainty evidence; the confidence interval crosses 1.Cochrane Database Syst Rev, 2020 · checked 2026-10-06 · we read the abstract - ev-mgcr-04 · Meta-analysis or systematic review · Cochrane systematic review of randomized trials · n = —
We found no RCTs evaluating magnesium for exercise-associated muscle cramps or disease-state-associated muscle cramps (for example amyotrophic lateral sclerosis/motor neuron disease) other than a single small (inconclusive) study in people with liver cirrhosis, only some of whom suffered cramps.
Who: people with exercise-associated or disease-state-associated muscle crampsEffect: no RCTs found for exercise-associated cramps; one small inconclusive trial in liver cirrhosis (29 people)Certainty: Absence of trials, searched to September 2019; no newer RCT on exercise cramps found in this pass.Cochrane Database Syst Rev, 2020 · checked 2026-10-06 · we read the abstract - ev-mgcr-05 · Meta-analysis or systematic review · systematic review and meta-analysis of RCTs · n = 332
The frequency of leg cramps after treatment was not decreased in the treatment group compared to the control group (WMD = -0.47, 95% CI: -1.14-0.20, P = 0.167).
Who: pregnant women with leg cramps in 4 randomized controlled trialsEffect: cramp frequency WMD -0.47 (95% CI -1.14 to 0.20); recovery OR 0.47 (0.14 to 1.52); side effects OR 1.82 (0.90 to 3.69)Certainty: Four small trials; PROSPERO-registered. Odds ratios, not risks.Taiwan J Obstet Gynecol, 2021 · checked 2026-10-06 · we read the abstract - ev-mgcr-06 · Meta-analysis or systematic review · systematic review and meta-analysis of RCTs · n = 364
In pregnancy-associated cramps (4 trials, N≈364), magnesium significantly reduced cramp frequency compared with placebo (pooled RR 1.35, 95% CI: 1.05-1.74, P = .02).
Who: pregnant women with leg cramps (4 trials, about 364) and adults with nocturnal or persistent leg cramps (4 trials, about 396)Effect: pregnancy: RR 1.35 (95% CI 1.05 to 1.74); nocturnal leg cramps in adults: MD -0.42 cramps/week (-1.15 to 0.31)Certainty: Newest synthesis, PROSPERO-registered; outcome definitions differ from the 2021 MA, which explains the conflicting pregnancy result.Int Dent J, 2026 · checked 2026-10-06 · we read the abstract - ev-mgcr-07 · Meta-analysis or systematic review · Cochrane systematic review of randomized trials · n = 576
However, other findings indicated that magnesium may make little to no difference in the frequency of leg cramps during differing periods of treatment.
Who: pregnant women with leg cramps in 8 randomized controlled trials of any interventionEffect: one trial: never having cramps after treatment RR 5.66 (95% CI 1.35 to 23.68; 69 women); other findings: little or no difference in frequency; no pooled meta-analysis possibleCertainty: Data from single trials only; GRADE low to very low.Cochrane Database Syst Rev, 2020 · checked 2026-10-06 · we read the abstract - ev-mgcr-08 · Meta-analysis or systematic review · systematic review of RCTs with meta-analysis using simulations · n = 361
Magnesium therapy does not appear to be effective in the treatment of NLC in the general population, but may have a small effect in pregnant women.
Who: adults with nocturnal leg cramps in 7 placebo-controlled RCTs, three of them in pregnant women onlyEffect: difference in median cramps per week 0.345 (2.5% to 97.5% quantile -0.133 to 0.875); pregnancy only 0.807 (0.015 to 1.207)Certainty: Weak evidence by the authors' rating: small trials, short follow-up.Fam Pract, 2014 · checked 2026-10-06 · we read the abstract - ev-mgcr-09 · Randomized controlled trial(s) · randomized double-blind placebo-controlled trial · n = 94
Mean (SD) change of NLC was -3.41 (4.05) (from 7.84 [5.68] to 4.44 [5.66]) and -3.03 (4.53) (from 8.51 [5.20] to 5.48 [4.93]) per week in the magnesium oxide and placebo groups, respectively, a difference between groups of 0.38 (0.48) NLC per week (P = .67 in an intention-to-treat analysis).
Who: community-dwelling adults 21 years or older with 4 or more nocturnal leg cramps in 2 weeks of screening, mean age 64.9Effect: change in cramps per week -3.41 (magnesium oxide) vs -3.03 (placebo), difference 0.38 (P = .67)Certainty: Large placebo response in both arms; the authors suggest it explains the popularity of magnesium for cramps.JAMA Intern Med, 2017 · checked 2026-10-06 · we read the abstract - ev-mgcr-10 · Randomized controlled trial(s) · three-arm randomized placebo-controlled trial · n = 121
No significant difference was observed between the magnesium and placebo groups, with an adjusted mean difference of -0.20 (95% CI -1.49 to 1.09; P = 0.929).
Who: adults aged 50 to 85 with at least two leg cramps per week in the previous 4 weeks, FinlandEffect: magnesium vs placebo adjusted MD -0.20 cramps/week (95% CI -1.49 to 1.09); compression stockings vs placebo -1.43 (-2.36 to -0.50)Certainty: Partially blinded (stockings cannot be blinded); magnesium arm itself was placebo-controlled.Trials, 2026 · checked 2026-10-06 · we read the abstract - ev-mgcr-11 · Randomized controlled trial(s) · randomized double-blind placebo-controlled trial · n = 46
The mean change in number of cramps per week, magnesium versus placebo arms, was -2.4 versus -1.7, p = .51, 95% confidence interval of the difference -3.1 to 1.7.
Who: community-dwelling older adults (69.3 +/- 7.7 years) with rest cramps, about 8 cramps a week at baselineEffect: change in cramps per week -2.4 (magnesium) vs -1.7 (placebo), p = .51, 95% CI of the difference -3.1 to 1.7Certainty: Small trial; tests whether poor oral absorption explains the null oral results.J Gerontol A Biol Sci Med Sci, 2011 · checked 2026-10-06 · we read the abstract - ev-mgcr-12 · Randomized controlled trial(s) · randomized double-blind placebo-controlled trial · n = 80
Fifty per cent reduction of cramp frequency was significantly higher in the magnesium group than the placebo group (86.0% vs. 60.5%, P=0.007).
Who: healthy pregnant women at 14-34 weeks of gestation with leg cramps at least twice per weekEffect: 50% reduction in cramp frequency 86.0% (magnesium) vs 60.5% (placebo), P = 0.007; 50% reduction in intensity 69.8% vs 48.8%, P = 0.048Certainty: Single-center trial; other pregnancy RCTs (31923242, 18768245) found no effect.Matern Child Nutr, 2015 · checked 2026-10-06 · we read the abstract - ev-mgcr-13 · Randomized controlled trial(s) · randomized placebo-controlled trial · n = 132
Oral magnesium supplementation during pregnancy did not reduce the ocurrence and frequency of episodes of leg cramps.
Who: pregnant women with leg cramps in the first trimester, randomized 1:1 to 300 mg/day oral magnesium citrate or placebo for 4 weeksEffect: cramp reduction 27.2% (magnesium) vs 32.8% (placebo); OR of leg cramps 1.3 (95% CI 0.6 to 2.9)Certainty: Authors call it an observational controlled trial although allocation was randomized.PLoS One, 2020 · checked 2026-10-06 · we read the abstract - ev-mgcr-14 · Observational data · cross-sectional and prospective cohort analyses · n = 3887
The prospective analyses demonstrated that participants taking magnesium supplements at baseline had a higher incidence of night cramps.
Who: CoLaus|PsyColaus population cohort, Lausanne, three follow-ups 2009-2021 (3887, 1916 and 1561 participants)Effect: magnesium users had a higher likelihood of night cramps and a higher incidence of night cramps prospectivelyCertainty: Observational; reverse causation likely (people with cramps take magnesium); no effect sizes in the abstract.Eur J Nutr, 2026 · checked 2026-10-06 · we read the abstract - ev-mgcr-15 · Position of an expert body · agency fact sheet · n = —
The Tolerable Upper Intake Level for supplemental magnesium is 350 mg for adults, and it ranges from 65 to 350 mg for children and adolescents, depending on age.
Who: Adults; children and adolescents 65 to 350 mg depending on ageEffect: UL for supplemental magnesium 350 mg/day (adults); food magnesium not countedCertainty: Cramp trials used 226 to 360 mg of elemental magnesium, at or just above the UL.NIH Office of Dietary Supplements, Magnesium fact sheet for health professionals · checked 2026-10-06 · we read the section - ev-mgcr-16 · Position of an expert body · agency fact sheet · n = —
The risk of magnesium toxicity increases with impaired renal function or kidney failure because the ability to remove excess magnesium is reduced or lost
Who: People with impaired renal function or kidney failureEffect: higher risk of magnesium toxicityCertainty: General agency warning without a numeric threshold.NIH Office of Dietary Supplements, Magnesium fact sheet for health professionals · checked 2026-10-06 · we read the section
How this page was made. Evidence was extracted from primary sources into cards, every number was re-checked against the source, and the text was written from those cards. Bioma Learn has no human medical reviewer at this time, and we say so rather than invent one. Methodology. This is information, not medical advice.