SUPPLEMENTS / EVIDENCE
Magnesium for Cramps (2026): What the Cochrane Review and Trials Show
By the biohack.site Editorial Team
We research products using brand pages, third-party lab reports and published studies. Not medical advice. How we make money
Last reviewed:
Does magnesium help muscle cramps? What the 2020 Cochrane review and a 94-person trial found, what causes muscle cramps, and how to use magnesium safely.
Affiliate disclosure: biohack.site is reader-supported. Some links on this page may be affiliate links, and we may earn a commission if you buy through them, at no extra cost to you. Commissions never decide our recommendations. See our affiliate disclosure.
Short answer: Magnesium is widely sold for cramps, but the best evidence says it is unlikely to help. A 2020 Cochrane review of 11 trials found that magnesium probably does not reduce how often or how severe cramps are in older adults, and a 94-person trial of magnesium oxide for night-time leg cramps found no difference from placebo. Evidence in pregnancy and in exercise-related cramps is too weak to say either way.
By the biohack.site editorial team · Last reviewed November 18, 2026

Searching "magnesium for cramps" returns plenty of confident product pages and very little trial data. This guide covers what causes muscle cramps, what the Cochrane review and the largest placebo-controlled trial we found actually showed, where the evidence has gaps, and what a sensible, safe approach to magnesium looks like if you take it anyway. It is general wellness information, not advice for any condition.
How we researched this: On November 18, 2026 we read the Cochrane review's plain-language summary and PubMed abstract, the 2017 JAMA Internal Medicine trial, two exercise-cramp reviews, the NHS leg cramps page and the NIH Office of Dietary Supplements magnesium fact sheet (updated January 6, 2026). We did not test any product. Where the evidence does not cover a group (pregnancy, exercise, medical conditions) we say so instead of guessing. Everything here is a summary of published research, so it will change if better trials appear.
What causes muscle cramps?
Muscle cramps are sudden, painful, involuntary muscle tightenings, and for most people no single cause is ever found. Cochrane notes that most cramps have no obvious underlying pathology and are called idiopathic. The NHS lists some common contributors to leg cramps: ageing, putting too much strain on muscles during exercise (worse in hot or humid weather), later pregnancy, certain medicines such as statins and diuretics, not drinking enough fluids and liver disease from heavy alcohol use. For some cramps the reason is unknown.
Exercise-related cramps have their own research. A 2022 evidence review in the Journal of Athletic Training concluded that these cramps likely come from a mix of personal and situational factors rather than one cause, and that individualised prevention works better than generic advice such as "drink more". Studies of endurance athletes link cramps with a previous history of cramping, a higher race intensity than usual, a family history and past tendon or ligament injuries (Shang 2011; Schwellnus 2008).
Situation | Commonly named contributors | What the sources say about relief |
|---|---|---|
At night or at rest | Ageing, some medicines, low fluid intake | NHS: calf stretching may reduce them but may not stop them completely |
During or after hard exercise | Fatigue from unusually high intensity, heat, past cramps | Gentle static stretching until the cramp eases |
In pregnancy | Usually later stages | Cochrane: too uncertain whether magnesium helps |
With a health condition or medicine | Statins, diuretics, liver disease | Needs a clinician's review rather than self-treatment |
Does magnesium help muscle cramps? What the Cochrane review found
The 2020 Cochrane review (Garrison et al.) found moderate-certainty evidence that magnesium is unlikely to reduce cramp frequency or severity in older adults. It included 11 randomized trials with 735 people, searched to September 2019. Here is how the groups broke down:
Group | Trials and people | What the review concluded |
|---|---|---|
Older adults with cramps | 5 trials, 271 people | Unlikely to reduce frequency or severity (moderate certainty) |
Pregnancy-related leg cramps | 5 trials, 408 people | Studies had important limitations and could not be combined; very uncertain |
Liver cirrhosis | 1 trial, 29 people | No difference, but too small to conclude |
Cramps during exercise | No trials found | Unknown |
On side effects, major events were rare, but minor ones, mostly diarrhea and nausea, affected roughly 11% to 37% of people taking magnesium, against 10% to 14% in the comparison groups (Cochrane summary; PubMed 32956536). Two of the 11 trials were funded by a manufacturer of magnesium tablets.
Magnesium for leg cramps at night: the largest trial
The most-cited single trial after the review is a 2017 randomized, double-blind study in JAMA Internal Medicine. It enrolled 94 adults (average age about 65) who had at least 4 night-time leg cramps in 2 weeks, and gave them magnesium oxide or placebo at bedtime for 4 weeks. Cramps fell in both groups: by about 3.4 a week with magnesium and 3.0 a week with placebo. The difference between groups was not significant (P = 0.67), and severity, duration, quality of life and sleep quality did not differ either. The authors suggested the drop in both groups was probably a placebo effect, which may help explain why magnesium is so widely used for cramps (Roguin Maor 2017).
That trial used magnesium oxide only. We found no trial that shows glycinate, citrate or another form works better for cramps, so choosing a "best magnesium for cramps" on cramp evidence is not possible. See our magnesium glycinate vs citrate guide for how the forms compare on absorption and tolerance, which is the evidence we do have.
When magnesium might still be worth discussing
Magnesium deficiency is a different question from "magnesium for cramps". NIH lists muscle contractions and cramps among the later signs of magnesium deficiency, after earlier ones such as loss of appetite, nausea, fatigue and weakness. NIH also says serum magnesium is a poor guide to total body magnesium. If you have persistent cramps together with other symptoms, or you take a medicine that can lower magnesium (the NIH sheet mentions diuretics, some antibiotics and long-term proton pump inhibitors), that is a reason to ask a clinician about testing, not to self-prescribe a bigger dose.
For most healthy people, the first step is to check the diet. The NIH Recommended Dietary Allowance for adults is 310 to 420 mg a day from food and supplements combined.
Food (NIH ODS) | Serving | Magnesium (mg) | % of 420 mg Daily Value |
|---|---|---|---|
Pumpkin seeds, roasted | 1 ounce | 156 | 37% |
Chia seeds | 1 ounce | 111 | 26% |
Almonds, dry roasted | 1 ounce | 80 | 19% |
Spinach, boiled | ½ cup | 78 | 19% |
Cashews, dry roasted | 1 ounce | 74 | 18% |
Black beans, cooked | ½ cup | 60 | 14% |
Magnesium and electrolytes for cramps
People often pair "magnesium for cramps" with "electrolytes for cramps". We did not find a primary source showing that an electrolyte powder prevents or relieves cramps, and the Journal of Athletic Training review argues against one-size-fits-all fluid advice. Magnesium in electrolyte mixes is a small amount compared with the 350 mg supplement limit, but it still counts toward your total. Our sugar free electrolyte powder guide lists the magnesium per serving in common mixes and explains what we can and cannot say about cramps, and our fasting electrolytes guide covers sodium, potassium and magnesium on a fast. If you want an electrolyte drink anyway, our natural electrolyte drink recipes show the sodium and potassium per litre.
What helps a cramp right now?
The NHS says stretching and massaging the muscle may ease the pain during a leg cramp, that most cramps go away on their own, and that standing and putting weight on the affected leg may also help. For prevention, regular calf stretching may reduce them, for example 5 minutes, 3 times a day, with the last session just before bed. The NHS advises seeing a GP if cramps disturb your sleep, come with numbness or swelling in the legs, or last longer than 10 minutes. For exercise cramps, gentle static stretching until the cramp passes is the standard advice in the athletic-training literature.
How to use magnesium safely if you still want to try it
The Tolerable Upper Intake Level for magnesium from supplements and medicines is 350 mg a day for adults, and high doses commonly cause diarrhea, nausea and stomach cramping. Keep these points in mind:
Count elemental magnesium, not the compound weight. Our glycinate vs citrate guide shows the label math: glycinate is about 14% magnesium by weight and citrate about 16%.
Add up every source. Supplements, antacids, laxatives and electrolyte mixes all count toward the 350 mg limit.
Stay below the limit and judge it fairly. If you try it, track cramps for a few weeks before and after, because the 2017 trial showed cramps can fall on placebo too.
Stop and ask a clinician if cramps are frequent, severe, one-sided with swelling, or started after a new medicine.
Check first if you are pregnant, breastfeeding, have kidney problems or take diuretics, certain antibiotics or bisphosphonates. The Cochrane review could not say whether magnesium helps pregnancy cramps.
The NIH notes that the forms most commonly reported to cause diarrhea include magnesium carbonate, chloride, gluconate and oxide. If you are comparing forms, our magnesium threonate vs glycinate guide explains why threonate costs far more per 100 mg of magnesium and what its evidence does and does not cover. Our supplements hub collects the other ingredient guides.
Frequently asked questions
Does magnesium help muscle cramps? The 2020 Cochrane review found it unlikely to reduce cramp frequency or severity in older adults, and found no trials in people who cramp during exercise. Evidence in pregnancy is too uncertain to judge.
Does magnesium help leg cramps at night? A 4-week, 94-person trial of magnesium oxide at bedtime found no difference from placebo (P = 0.67).
What causes muscle cramps? Often no cause is found. Contributors include ageing, hard or unaccustomed exercise (especially in heat), pregnancy, some medicines such as statins and diuretics, low fluid intake and liver disease.
What is the best magnesium for cramps? We found no trial showing that any form beats another for cramps. Forms differ in absorption and stomach tolerance, which we cover in our glycinate vs citrate guide.
How much magnesium can I take? The adult upper limit for supplemental magnesium is 350 mg a day, counting all supplements and medicines. Food magnesium does not count toward it.
Can magnesium cause side effects? Yes. Diarrhea, nausea and stomach cramping are the most common, and Cochrane reported minor side effects in roughly 11% to 37% of participants on magnesium.
Do electrolyte drinks stop cramps? We found no primary source showing that they do. See our sugar free electrolyte powder guide for what we can and cannot say.
When should I see a doctor about cramps? The NHS suggests a GP visit if cramps disturb your sleep, come with numbness or swelling, or last longer than 10 minutes.
Related guides
What changed
First published November 18, 2026. Studies and NIH figures were checked on that date.
Sources
This page is for general information and is not medical advice. It does not diagnose, treat, cure or prevent any condition. Supplements are not approved by the FDA before sale. Talk to a qualified clinician before starting any supplement. See our medical disclaimer.
Desk-research overview. No hands-on testing or medical review is implied. Educational information only. Product terms and availability can change; verify details with the provider.