The short answer

Probably not, for most people. A Cochrane review of 11 trials found magnesium is unlikely to reduce ordinary night-time leg cramps in older adults, and the largest trial found it no better than placebo. Evidence for cramps in pregnancy is conflicting. It may help if a blood test shows your magnesium is low.

No good evidence

No placebo-controlled human trial supports the claim, or the trials that exist found no effect. How we grade

On this page
  1. What does the Cochrane review say?
  2. What did the largest trial find?
  3. Is there any trial where it helped?
  4. What about cramps in pregnancy?
  5. When does magnesium make sense for cramps?
  6. What doesn’t the evidence show?
  7. Common questions
  8. References

What does the Cochrane review say?

In 2020 a Cochrane review pulled together 11 randomised trials involving 735 people. For idiopathic cramps (cramps with no obvious cause, usually night-time calf cramps in older adults) the differences between magnesium and placebo were small and not statistically significant. The trials agreed with each other, which makes the result more convincing. The reviewers concluded that magnesium is unlikely to provide clinically meaningful protection against these cramps.

What did the largest trial find?

A trial in Israel, published in JAMA Internal Medicine in 2017, gave 94 adults with at least four night cramps a fortnight either magnesium oxide or a lookalike placebo at bedtime for four weeks. Cramps fell from about 8 a week to about 4.4 on magnesium, and from about 8.5 to 5.5 on placebo. The difference between the groups was tiny and could easily have been chance.

That pattern explains why magnesium has such a strong reputation: almost everyone gets better after starting it, but they get better on placebo too.

Is there any trial where it helped?

A small British crossover trial in 2002 gave 46 people magnesium citrate (300 mg of magnesium) and placebo for six weeks each. There were slightly fewer cramps on magnesium, but the result fell short of statistical significance. More people said magnesium had helped than said placebo had. The authors called for further trials; the later, larger ones were negative.

What about cramps in pregnancy?

Leg cramps are common in the second half of pregnancy. A 2020 Cochrane review of treatments found the trials of oral magnesium gave inconsistent results, and rated the evidence as low or very low certainty. Some women in the trials did report fewer cramps. If you are pregnant, ask your midwife or GP before taking any supplement.

When does magnesium make sense for cramps?

When you are genuinely short of it. Low blood magnesium can cause cramps, twitching and spasms. It is most likely if you:

  • take a proton pump inhibitor such as omeprazole or lansoprazole for a long time, which the MHRA has warned can cause low magnesium (see medicines and magnesium)
  • take loop or thiazide diuretics
  • drink alcohol heavily
  • have diarrhoea, coeliac disease, Crohn’s disease or have had bowel surgery

In those cases, see your GP. A blood test can confirm it, and treating a real deficiency is worth doing. Signs of low magnesium lists the other symptoms to look out for.

What doesn’t the evidence show?

Restless legs are a different problem from cramps, with their own small body of magnesium research: see magnesium for restless legs.

It doesn’t rule out a small benefit for some individuals, and it says little about cramps during or after exercise, which have been studied far less. But it does show that magnesium is not the reliable fix for ordinary night cramps that it is often sold as.

Keep reading

Common questions

Why do so many people say magnesium cured their cramps?

Night cramps come and go on their own, and placebo works well for them. In the largest trial, cramps fell by about three a week on magnesium and by about three a week on placebo too. Feeling better after starting magnesium does not mean magnesium caused it.

What actually helps night-time leg cramps?

Stretching the calf, before bed and during a cramp, is the NHS's first suggestion. Some medicines, including statins and diuretics, can cause cramps, so ask your GP or pharmacist about yours. A GP may offer quinine if stretching has not helped, but it is not suitable for everyone because of its side effects.

Can low magnesium cause cramps?

Yes. Genuine magnesium deficiency can cause muscle cramps, twitching and spasms. It is most likely if you take long-term acid-reducing medicines or diuretics, drink heavily or have a bowel condition. A blood test can check, and treatment then makes sense.

Does magnesium help cramps after exercise?

There's little research on it. Exercise cramps seem to be mostly about muscle fatigue rather than low magnesium, and stretching is the usual first step.

References

  1. Garrison SR et al. Magnesium for skeletal muscle cramps. Cochrane Database of Systematic Reviews, 2020.pubmed.ncbi.nlm.nih.gov
  2. Roguin Maor N et al. Effect of magnesium oxide supplementation on nocturnal leg cramps: a randomized clinical trial. JAMA Internal Medicine, 2017.pubmed.ncbi.nlm.nih.gov
  3. Roffe C et al. Randomised, cross-over, placebo controlled trial of magnesium citrate in the treatment of chronic persistent leg cramps. Medical Science Monitor, 2002.pubmed.ncbi.nlm.nih.gov
  4. Luo L et al. Interventions for leg cramps in pregnancy. Cochrane Database of Systematic Reviews, 2020.pubmed.ncbi.nlm.nih.gov
  5. NHS. Leg cramps.nhs.uk
  6. MHRA. Proton pump inhibitors in long-term use: reports of hypomagnesaemia. Drug Safety Update, 2012.gov.uk

First published 4 November 2026. Spotted an error? Tell us and we'll correct it. Read our editorial policy.