magnesium

Magnesium vs Melatonin for Sleep: What's the Difference?

Magnesium and melatonin are often lumped together as sleep supplements, but they are completely different things. Here is how they compare and what sleep experts recommend first.

Man sitting up in bed at night holding a book by a warm bedside lamp

Quick answer

Melatonin is a hormone that signals "night" to your body clock. It has the best evidence for jet lag and body-clock timing problems, not ongoing insomnia. Magnesium is an essential mineral involved in nerve and muscle function. Its evidence for sleep is limited and low quality. Neither is a first-line treatment for chronic insomnia; sleep experts recommend CBT for insomnia first.

Walk down any supplement aisle and you will see magnesium and melatonin side by side under "sleep". They work in completely different ways. Here is how they compare.

Magnesium vs melatonin at a glance

Melatonin Magnesium
What it is A hormone your brain makes in the dark An essential mineral from food
What it does Signals night-time to your body clock Involved in hundreds of reactions, including nerve and muscle function
Best evidence Jet lag; delayed body-clock timing Limited, low-quality evidence for sleep
Chronic insomnia The AASM suggests clinicians not use it Not established as a treatment
Status Supplement in the US; prescription or pharmacy-only in some countries, such as the UK and Australia Dietary supplement; also in food
Common side effects Next-day drowsiness, headache, dizziness Diarrhea, nausea, cramping

What the evidence says about melatonin

Melatonin can help shift the timing of sleep, which is why it is used for jet lag and certain body-clock disorders. For chronic insomnia in adults, the American Academy of Sleep Medicine's 2017 guideline suggests clinicians not use melatonin, because the evidence of benefit was weak.

Label accuracy is also a concern. In a 2023 JAMA study of 25 melatonin gummy products sold in the US, 22 were inaccurately labelled, with actual melatonin ranging from 74% to 347% of the stated amount.

What the evidence says about magnesium

A 2021 meta-analysis of three small trials in older adults found magnesium shortened the time to fall asleep by about 17 minutes compared with placebo, but the evidence was rated low to very low quality, and the authors said it was too weak to base recommendations on. For the full picture, see magnesium and sleep.

Can you take magnesium and melatonin together?

There is no well-known interaction between them, and some products combine both. That does not make the combination proven. If you take medicines, are pregnant, or have a health condition, check with a pharmacist or doctor first.

What sleep experts recommend first

For ongoing insomnia, cognitive behavioural therapy for insomnia (CBT-I) is the recommended first-line treatment. Everyday habits matter too: a consistent wake time, no caffeine within about 6 hours of bed, dim lights in the evening and a wind-down routine. See our science-backed evening wind-down routine.

90-DAY SUPPLY · SUBSCRIBE & SAVE 10%

  • $35.00 one-time purchase
  • $31.50 every 3 months with Subscribe & Save
  • One capsule per day, 90 capsules per bottle
  • Pause, skip or cancel anytime

VIEW MAGNESIUM COMPLEX →

Alurevia Magnesium Complex is a daily magnesium supplement, not a sleep aid, and contains no melatonin.

Frequently asked questions

Is magnesium or melatonin better for sleep?

They do different things. Melatonin shifts sleep timing and is best supported for jet lag. Magnesium is a nutrient with limited sleep evidence. Neither is a first-line treatment for chronic insomnia.

Can I take magnesium and melatonin together?

There is no well-known interaction, but check with a pharmacist if you take medicines or have a health condition.

Is magnesium safer than melatonin?

Both are generally well tolerated at label doses in healthy adults, with different side effects. Magnesium supplements have a 350mg adult upper limit, and people with kidney disease should avoid them unless advised.

Does magnesium make you sleepy like melatonin?

Magnesium is not a sedative and does not act on your body clock the way melatonin does.

Sources

Sateia MJ, et al. Clinical practice guideline for the pharmacologic treatment of chronic insomnia in adults. Journal of Clinical Sleep Medicine, 2017. Lee Cohen P, et al. Quantity of Melatonin and CBD in Melatonin Gummies Sold in the US. JAMA, 2023. Mah J, Pitre T. Oral magnesium supplementation for insomnia in older adults. BMC Complementary Medicine and Therapies, 2021.

This article is general education and is not medical advice. These statements have not been evaluated by the Food and Drug Administration. This product is not intended to diagnose, treat, cure, or prevent any disease. Speak with a healthcare professional for individual guidance.