Longevity Report CardLongevity Report CardGet your score

Does magnesium help with sleep and anxiety?

Partly trueEvidence: Trials

Helped older insomniacs fall asleep about 17 minutes faster in tiny trials; anxiety evidence is poor.

What you hear: “Taking magnesium before bed fixes your sleep and calms anxiety.”

What the studies found

Three small randomised trials in 151 older adults with insomnia found magnesium cut the time to fall asleep by about 17 minutes versus placebo; total sleep rose by 16 minutes but that was not statistically clear, and all trials were at moderate-to-high risk of bias. For anxiety, a review of 18 studies in people already prone to anxiety found hints of benefit in about half, but the authors rated the evidence as poor. No good trials show it 'fixes' sleep or anxiety in the general population.

Take care: Magnesium pills can cause stomach upset such as diarrhoea.

What you could do

Magnesium-rich foods are worth eating, and a pill may help a little with falling asleep, but it is not a cure for insomnia or anxiety.

See it in the habit library, with what it means for your own longevity score.

Not medical advice. General information from published studies, not a diagnosis or a treatment plan. Talk with your doctor before starting a supplement or changing a medicine, especially if you are pregnant, take other medicines or have a health condition.

How we judged it

Partly true: Some truth, but oversold as usually said. We judge the claim as it is usually said online, not the habit itself. Trials assign people at random, so they can show cause; observed studies follow people and show a link, not proof. Last checked: October 2026.

The studies, in their own words

  1. Mah and Pitre. BMC Complement Med Ther 2021
    Pooled analysis showed that post-intervention sleep onset latency time was 17.36 min less after magnesium supplementation compared to placebo
  2. Boyle et al. Nutrients 2017
    Existing evidence is suggestive of a beneficial effect of Mg on subjective anxiety in anxiety vulnerable samples. However, the quality of the existing evidence is poor.
  3. Garrison et al. Cochrane Database Syst Rev 2020
    oral magnesium was associated with mostly gastrointestinal adverse events (e.g. diarrhoea)

More claims, checked

See all 50 claims

What is your longevity score?Two minutes, free, and your answers stay on your deviceGet my score
New findings, once a month

One short email when we add new studies or exercises, each with its source. No spam, and you can unsubscribe any time.

By signing up you agree to our Privacy Policy.