Magnesium supplements for sleep and cramps
Does magnesium help you sleep?
The answer
Magnesium tablets did not clearly prevent leg cramps in older adults, and for sleep three small, low-quality trials in older adults hint at falling asleep a little faster. Our search found no supplement trial in Black participants. Up to four hundred milligrams a day from supplements is unlikely to harm; more can cause diarrhoea.
Do
- Get magnesium from food first: the UK's NHS says a varied, balanced diet should give you all you need.Clinical guidance NHS, "Vitamins and minerals: Others" (magnesium)
- If you try a supplement, keep it to 400 mg a day or less: the UK's NHS says that is unlikely to cause harm.Clinical guidance NHS, "Vitamins and minerals: Others" (magnesium)
Avoid
- More than 400 mg a day from supplements: the UK's NHS says high doses can cause diarrhoea, and long-term effects are not known.Clinical guidance NHS, "Vitamins and minerals: Others" (magnesium)
- Relying on magnesium tablets to stop night leg cramps: in older adults the Cochrane review found no clear effect.Tested Garrison 2020
What families do
Tradition and common belief, not evidence.
Magnesium is a mineral in leafy greens, nuts, beans and whole grains. Magnesium tablets, powders and sprays are widely promoted for sleep, cramps, stress and muscle recovery.
The evidence
The Cochrane review of 11 trials with 735 people found magnesium made little difference to cramps in older adults with idiopathic cramps, with moderate-certainty evidence; pregnancy cramp trials were at high risk of bias. A review of three trials in 151 older adults found sleep onset about 17 minutes faster with magnesium, rated low to very low quality. A 2003 review reports that low magnesium status may be more common in African Americans and calls for trials; the supplement trials I found did not report ethnicity.
This tier rests on: That magnesium helps sleep and cramps: a Cochrane review found no clear cramp benefit in older adults, and three small low-quality trials (151 older adults) hint at faster sleep onset; none in Black participants.
Why this tier and strength: Randomised trials exist but the sleep trials are three small, high-risk-of-bias studies rated low to very low quality, so thin. It stays B, short of A, because no supplement trial in people of African descent was found.
What has been tested
B People with skeletal muscle cramps in 11 randomised trials (five in pregnancy, five idiopathic, one cirrhosis) (n=735)
Cochrane systematic review of magnesium supplements for cramp prevention.
For idiopathic cramps, largely in older adults (mean age about 62 to 69), cramp frequency differences between magnesium and placebo were small and statistically non-significant (moderate-certainty evidence). The pregnancy and cirrhosis trials were at high risk of bias.
Garrison SR, Korownyk CS, Kolber MR, Allan GM et al (2020), Cochrane Database of Systematic Reviews, [review] Open source Study page
Note: Ethnicity not reported in the abstract.
B Older adults with insomnia in three randomised trials, in three countries (n=151)
Systematic review and meta-analysis of oral magnesium against placebo for sleep.
Sleep onset latency was 17 minutes shorter with magnesium (95% CI 7 to 27 minutes). Total sleep time improved by 16 minutes, which was not significant. All trials were at moderate to high risk of bias and the evidence was rated low to very low quality.
Mah J, Pitre T (2021), BMC Complementary Medicine and Therapies, [review] Open source Study page
Note: Older adults only, three small trials. Ethnicity not reported in the abstract.
B African Americans (narrative review of observational evidence on magnesium status) (n=not applicable)
Narrative review.
The authors report that lower dietary and serum magnesium go with hypertension, insulin resistance and diabetes, and that occult magnesium deficiency may be more prevalent in African Americans than in other groups. They say trials that correct magnesium status in African Americans still need to be done.
Fox CH, Mahoney MC, Ramsoomair D, Carter CA (2003), Journal of the National Medical Association, [review] Open source Study page
Note: Review from 2003 and an association, not a trial. It is a reason to ask for a trial in Black participants, and it does not show that a supplement helps.
Harm
No signal found: No harm signal at up to 400 mg a day. The UK's NHS says higher doses can cause diarrhoea and long-term effects are unknown. I did not open a source on kidney disease or medicine interactions (the NIH Office of Dietary Supplements page was blocked), so none is claimed.
Measured variables
- Cramp frequency (per week)
- Sleep onset latency and total sleep time
- Dietary and serum magnesium (measured in the observational work)
- No ancestry variable in the supplement trials
Not tested, and gaps
My PubMed search (title and abstract terms for the product, with African American, African-American, Black adults, Black women, Black men, African descent, African ancestry and similar terms) returned 38 records for magnesium supplementation; the relevant ones were observational (a 2003 review, intake surveys), and none was a magnesium supplement trial for sleep or cramps in Black participants. The same search style for "vitamin D" returned 930 records, so the search works. ClinicalTrials.gov (API v2, intervention search with "African American" OR Black anywhere in the record): 32 records matched (titles read only; most unrelated). The NIH Office of Dietary Supplements pages returned a security check and could not be opened. Untested: sleep or cramp benefit in Black participants; whether any low magnesium status in Black adults is corrected by supplements.
All sources
- Garrison SR, Korownyk CS, Kolber MR, Allan GM et al (2020), Cochrane Database of Systematic Reviews, [review] Open
- Mah J, Pitre T (2021), BMC Complementary Medicine and Therapies, [review] Open
- Fox CH, Mahoney MC, Ramsoomair D, Carter CA (2003), Journal of the National Medical Association, [review] Open
- NHS, "Vitamins and minerals: Others" (magnesium), [official], practical advice (clinical guidance), opened 2026-11-16 Open
Common questions
Does magnesium help you sleep?
Magnesium tablets did not clearly prevent leg cramps in older adults, and for sleep three small, low-quality trials in older adults hint at falling asleep a little faster.
Does magnesium stop leg cramps?
Magnesium tablets did not clearly prevent leg cramps in older adults, and for sleep three small, low-quality trials in older adults hint at falling asleep a little faster.
How much magnesium is safe to take?
Magnesium tablets did not clearly prevent leg cramps in older adults, and for sleep three small, low-quality trials in older adults hint at falling asleep a little faster.
Do Black people need more magnesium, and has it been tested?
Up to four hundred milligrams a day from supplements is unlikely to harm; more can cause diarrhoea.
Last checked against its sources: . Next check due: 16 May 2027.
This is information, not medical advice. If you are worried, see a doctor or pharmacist. How we grade the evidence.