
For the common night leg cramps of older adults, a 2020 Cochrane review found that magnesium supplements are unlikely to make a clinically meaningful difference: cramp frequency, intensity, and duration were about the same as with placebo. For leg cramps in pregnancy, the trials conflict. Magnesium can still matter if you have a confirmed deficiency or take a medicine that lowers magnesium. Regular calf stretching, checking your medicines, and talking to a clinician about frequent or unusual cramps are better first steps than a new bottle.
It is 3 a.m. and your calf has locked into a hard knot. You flex your foot, swear quietly, and wait for it to let go. By morning, someone has told you to take magnesium, and the shelf at the pharmacy agrees: half the magnesium labels mention cramps.
Magnesium does play a role in how muscles contract and relax, so the idea is not absurd. The question is whether taking more of it, on top of an ordinary diet, actually reduces cramps. For the most common kind, night leg cramps in older adults, the best evidence says probably not. The picture is less settled in pregnancy, and different again if you are genuinely low in magnesium.
What the research found
The most complete summary is a Cochrane review by Garrison and colleagues, updated in 2020. It pooled 11 randomized trials with 735 participants.
Idiopathic cramps, mostly night cramps in older adults. In five trials of people with cramps that had no clear cause, mostly adults in their 60s, magnesium did not meaningfully change how often cramps happened compared with placebo. After four weeks, the difference was about 0.18 fewer cramps per week, a result small enough to be explained by chance. The share of people whose cramps dropped by a quarter or more was the same in both groups (high-certainty evidence). Cramp intensity and duration did not differ either. The authors concluded that magnesium is unlikely to provide clinically meaningful cramp prevention for older adults.
Leg cramps in pregnancy. Five trials enrolled pregnant women, but all were judged at high risk of bias and could not be pooled. One found no benefit, one found benefit, and one gave inconsistent results. The honest answer is: unknown. Any supplement in pregnancy should be agreed with the clinician or midwife looking after you.
Exercise cramps and disease-related cramps. The review found no randomized trials of magnesium for cramps during or after exercise, and only one small, inconclusive study in liver disease.
Side effects. Oral magnesium mostly caused digestive effects such as diarrhea. In the trials where it could be measured, minor side effects were somewhat more common with magnesium than with placebo.
Why magnesium still gets recommended
Three reasons keep the advice alive:
- The biology sounds right. Magnesium is involved in muscle and nerve function, and very low blood magnesium can cause cramps and spasms. That does not mean extra magnesium helps someone whose level is already normal.
- Night cramps come and go. They often cluster for a few weeks and then ease on their own. If you start a supplement during a bad stretch, the natural improvement looks like a result.
- Deficiency is real for some people. Heavy alcohol use, some digestive conditions, poorly controlled diabetes, and medicines such as long-term proton pump inhibitors or some diuretics can lower magnesium. For those people, correcting a measured deficiency is a different question from preventing ordinary cramps. Our guide to magnesium deficiency symptoms explains who is at risk and how it is tested.
What tends to help leg cramps
The NHS leg cramps page lists simple measures that cost nothing:
- During a cramp: stretch and massage the muscle. Standing up and putting weight on the leg can help a calf cramp let go.
- Afterwards: paracetamol or ibuprofen can ease soreness, though they do not help during the cramp itself.
- To reduce how often they happen: regular calf stretching, for example before bed. It may not stop cramps completely.
It is also worth looking for a cause. The NHS lists ageing, strain from exercise (worse in heat), late pregnancy, dehydration, liver disease related to alcohol, and certain medicines, including statins and diuretics. If cramps started around the time a new medicine did, raise it with the prescriber rather than stopping the medicine yourself.
If you want to try magnesium anyway
Some people decide to run a short personal trial. If you do, keep it safe and measurable:
- Check with a clinician first if you have kidney disease, are pregnant, or take antibiotics, bisphosphonates, or other regular medicines. Impaired kidneys may not clear excess magnesium.
- Stay within the label and the limit. In the US, the upper limit for adults is 350 mg a day of magnesium from supplements and medicines, per the NIH Office of Dietary Supplements. Magnesium in food does not count toward it.
- Count cramps for two weeks before you start, then for four weeks on the supplement. Night cramps vary so much that memory is a poor judge.
- Change one thing at a time. If you start stretching and magnesium on the same day, you will not know which one helped.
Supplement Tracker can hold the dose, the time you take it, and a quick note each morning about whether a cramp woke you. After a month, that log gives a clearer answer than a vague sense that "it seems better."
Forms differ mainly in how they sit in your gut. Citrate and oxide are more likely to loosen stools; glycinate tends to be gentler. Our glycinate vs citrate comparison covers the trade-offs, and when to take magnesium covers timing.
When to see a doctor
Leg cramps are common and usually harmless, but get advice if:
- cramps regularly disturb your sleep
- a cramp lasts longer than about 10 minutes
- you also have numbness, weakness, or swelling in the leg
- cramps started after a new medicine
- one calf is swollen, warm, red, or painful even between cramps, which needs prompt assessment
A clinician can check for causes such as medicine effects, electrolyte problems, or circulation and nerve conditions, and may suggest stretching programs or, in some cases, other treatments.
The practical answer
For typical night leg cramps in older adults, magnesium supplements are unlikely to help much, according to the best available trials. Start with stretching, a look at your medicines, and enough fluids. In pregnancy, the evidence is mixed, so decide with your midwife or doctor. If you have a confirmed deficiency, treating it is worthwhile for its own sake, cramps or not.
This article is for educational purposes and does not constitute medical advice. Persistent, severe, or unusual cramps, and any leg swelling or pain between cramps, need professional assessment.
Sources
- Garrison SR, Korownyk CS, Kolber MR, et al. Magnesium for skeletal muscle cramps. Cochrane Database of Systematic Reviews, 2020.
- NHS. Leg cramps.
- NIH Office of Dietary Supplements. Magnesium: Fact Sheet for Health Professionals.



