longevitywatch
← Back

Does magnesium help with poor sleep and muscle cramps, and which form should you take?

Short answer
UncertainMagnesium may help with difficulty falling asleep, the evidence is weak, and data on muscle cramps are absent.
How solid is this?
Limited evidence
Based on
8 studies · 1 meta-analyses
participants
25,872
Key takeaway

Magnesium supplementation may reduce sleep onset time in older adults by approximately 17 minutes, but the evidence is of low quality and based on very small studies. No controlled data on muscle cramps were provided in the available sources. Which form of magnesium is most effective cannot be determined on the basis of the current information.

Last reviewed: June 2026

Magnesium and sleep: what does the evidence say? There is some evidence that magnesium supplementation can improve sleep, but the quality of that evidence is limited. A meta-analysis of three small RCTs (randomised controlled trials) in older adults with insomnia showed that magnesium reduced the time to fall asleep by an average of approximately 17 minutes compared with a placebo. Total sleep duration increased slightly, but that difference was not statistically convincing. All three studies had a moderate to high risk of bias and together included only 151 participants. The researchers themselves rated the evidence as low to very low. (PMID 33865376)

In 290 diabetes patients, an RCT showed that magnesium significantly reduced the perceived severity of insomnia and had a favourable effect on the sleep hormones melatonin and cortisol. A caveat: this study was single-blind only (participants did not know what they were receiving, but the research team did) and specifically involved people with diabetes, so the findings cannot simply be applied to the general population. (PMID 39534260)

Large population studies support an association between good magnesium status and better sleep, but do not prove cause and effect. An American population study of more than 20,000 people found that individuals with signs of magnesium deficiency reported sleep apnoea almost three times as often, but showed no increased likelihood of ordinary insomnia or insufficient sleep. In nearly 4,000 older Chinese adults, higher urinary magnesium was associated with a modestly lower likelihood of poor sleep. In nearly 900 kidney transplant patients, a low blood magnesium level was associated with worse sleep. These are all observational studies: the fact that magnesium and sleep are linked does not yet prove that taking magnesium improves sleep. (PMID 38703902, 37340210, 37418245, 40233517)

Muscle cramps: the claims provided contain no direct controlled data on magnesium for muscle cramps. This topic cannot be answered in a substantiated way on the basis of the available information.

Which type of magnesium? The available studies do not specify a preference for a particular form of magnesium (such as glycinate, citrate or oxide). What is clear is that doses of less than 1 gram taken up to three times daily produced no serious side effects in older adults across the RCTs. Because the studies were small, rare side effects may have been missed. A well-known side effect of higher magnesium doses in general is diarrhoea, but this was not broken down separately by form in the data provided. (PMID 33865376)

Finally: there is animal research showing that magnesium combined with apigenin (a compound from chamomile) promoted sleep more strongly than either substance alone, possibly through inhibition of inflammatory processes in the brain. Whether this works in humans is unknown. A narrative nutrition review lists magnesium as one of the minerals for which adequate dietary intake is associated with better sleep, without providing specific effect sizes. (PMID 41701207, 40728459)

How solid is this?

Nine claims used, drawn from multiple PMIDs. Sleep: combination of 1 meta-analysis (3 RCTs, N=151), 1 single-blind RCT (N=290), multiple observational studies (total >25,000 participants), 1 animal experiment and 1 narrative review. Muscle cramps: no relevant claims provided, cannot be answered. The meta-analysis itself rates the evidence as low to very low.

Did this answer your question?
Weekly newsletter

The week in longevity, in your inbox

Every Sunday, a selection of the most striking longevity research. No hype, no supplement ads.