🌱 Welcome to Factnetize — honest, well-researched articles on tech, health and AI. Read more →
Health

Magnesium glycinate for sleep vs melatonin: what the evidence shows

Melatonin moves your body clock; magnesium tops up a mineral many people lack. Here is which one fits your sleep problem, and when to skip both.

Amber supplement bottle and dish of white capsules on a nightstand by a dim lamp, illustrating magnesium glycinate for sleep

⚡ Key takeaways

  • Melatonin shifts the timing of sleep. It works best for jet lag and a body clock that runs late, and only a little for ordinary insomnia.
  • Magnesium showed small benefits in a few small trials, mostly in older adults.
  • Neither is a sleeping pill. Sleep specialists suggest against melatonin for chronic insomnia in adults.
  • Keep melatonin gummies away from children, and skip magnesium supplements if you have kidney disease unless your doctor agrees.

You are standing in the supplement aisle with two bottles: melatonin and magnesium glycinate for sleep. Both promise a better night, and both are cheap. The short answer is that they do different jobs, and which one fits depends on whether your problem is the timing of your sleep or the quality of it. Table 1 gives the verdict.

Option What it does Best evidence for Main limit Studied dose
Melatonin Signals “night” to your body clock Jet lag; a body clock that runs late Small effect on ordinary insomnia; gummy labels often wrong 0.5–5 mg near the target bedtime (jet lag)
Magnesium Tops up a mineral many people get too little of Mild insomnia, mainly in older adults Few, small trials; low-quality evidence 250 mg elemental magnesium, 30–60 minutes before bed (glycinate trial)
Table 1 · Melatonin or magnesium: which one fits which sleep problem

How melatonin works, and when it helps

The short version: melatonin moves your body clock; it barely knocks you out. In the US, the dose on the label is not guaranteed.

Your brain makes melatonin when it gets dark, and light in the evening can block it. The National Center for Complementary and Integrative Health says it helps with the timing of your 24-hour internal clock.

That is why the effect on ordinary insomnia is small. A 2013 meta-analysis of 19 studies with 1,683 people found that melatonin helped people fall asleep about 7 minutes faster and sleep about 8 minutes longer than placebo. The authors called the effects modest. In 2017, the American Academy of Sleep Medicine guideline suggested that clinicians not use melatonin for chronic insomnia in adults.

Timing problems are where melatonin earns its place. A Cochrane review on jet lag found less jet lag after flights across five or more time zones when people took melatonin close to bedtime at their destination. Doses from 0.5 to 5 mg worked about equally well, and higher doses added nothing. Taken early in the day, it can make you sleepy and slow your adjustment.

For people whose body clock runs late, the AASM endorsed strategically timed melatonin in 2015. In one trial of 307 people, taking it 1 hour before the desired bedtime, combined with a set bedtime, helped them fall asleep 34 minutes earlier. For shift workers, the studies were small or inconclusive.

One US-specific catch: melatonin is sold as a dietary supplement here, not as a drug, so it is regulated less strictly. In a 2023 test of 25 melatonin gummies, 22 were labeled inaccurately. One had no detectable melatonin, and the rest held 74% to 347% of the amount on the label.

What the trials show for magnesium glycinate for sleep

The short version: a handful of small trials found modest gains, and there are still too few glycinate trials to judge that form.

Magnesium is a mineral, not a sleep hormone. Adults need 310 to 420 mg a day, depending on age and sex, and the NIH Office of Dietary Supplements reports that 48% of Americans get less from food than the average requirement.

The older trials used other forms. A 2021 review pooled three trials in 151 older adults who took magnesium oxide or citrate. They fell asleep about 17 minutes faster than on placebo, but total sleep time did not change significantly, and the reviewers rated the evidence as low to very low quality. A 2026 systematic review of 12 trials reached the same verdict: the findings were inconsistent, and the certainty of the evidence was low to very low.

The glycinate trial found a small effect. In a 2025 German trial, 155 adults aged 18 to 65 who slept poorly took 250 mg of magnesium as bisglycinate, or a placebo, 30 to 60 minutes before bed for 4 weeks. Their insomnia scores dropped by 3.9 points versus 2.3 on placebo, a difference the authors called modest. An exploratory analysis hinted at larger gains in people who ate little magnesium.

When you buy, check the label: the number is elemental magnesium, and the upper limit from supplements is 350 mg a day for adults.

Who should be careful

Both are sold over the counter, but some people should talk to a doctor first.

  • Children. Pediatric melatonin ingestions reported to US poison centers rose 530% from 2012 to 2021; five children needed a ventilator and two died. The AASM advises treating melatonin as a medication, storing it out of reach and asking a pediatric professional before using it.
  • Kidney disease. Weak kidneys clear magnesium poorly, which raises the risk of toxicity.
  • Epilepsy or blood thinners. NCCIH says people in either group need medical supervision for melatonin.
  • Some medications. Magnesium reduces the absorption of osteoporosis drugs such as alendronate and of tetracycline and quinolone antibiotics, so they need to be taken hours apart.

How to choose, and how to test it

Start from your problem, not from the bottle.

  • If you fly across several time zones, melatonin near your target bedtime has the best evidence of anything here.
  • If you cannot fall asleep before 2 am and struggle to wake up, ask a doctor about timed melatonin.
  • If you sleep lightly and eat few nuts, seeds, beans or whole grains, magnesium is a reasonable, low-cost test.
  • If you wake in the night or work night shifts, neither has good evidence for your problem.
  • If you have had insomnia for months, take neither as your fix. The 2017 guideline lists no supplement it recommends, and it is time to see a clinician.

Test one at a time for two weeks. Keep a short note each morning: when you went to bed, roughly when you fell asleep, and how rested you feel. Change nothing else. If you see no difference after two weeks, stop. For melatonin, choose a product with the USP Verified Mark, as the AASM recommends for children, to improve your odds that the label is right.

Why I take magnesium

I didn’t start magnesium for sleep. I started it because of sudden calf cramps at night or early in the morning, back when I was training regularly. Since I began taking it, the cramps haven’t come back.

That is my experience, not evidence. A 2020 Cochrane review of 11 trials concluded that magnesium is unlikely to meaningfully prevent cramps in older adults, and it found no trials on exercise-related cramps. My magnesium sits in the same place as in my supplement tier list: cheap and low risk, with modest expectations.

Frequently asked questions

Does more melatonin work better?

Partly true. In the jet lag trials, 5 mg helped people fall asleep faster than 0.5 mg, but doses above 5 mg added nothing. With gummies, the real dose may already be well above the label.

Does melatonin stop working if you take it every night?

Not supported. The 2013 meta-analysis found that the modest effects did not seem to fade with continued use. Long-term safety data are lacking, though, according to NCCIH.

Does magnesium help night-time leg cramps?

Not supported in older adults with ordinary night cramps, according to the 2020 Cochrane review. That review found no trials on exercise-related cramps.

This article is part of the Lab of One series.

Disclaimer. This article is published for educational purposes only and does not constitute medical advice, diagnosis, or treatment. I am not a clinician. If you have kidney disease, epilepsy, take blood thinners or other prescription medication, or are thinking of giving melatonin to a child, talk to a qualified healthcare professional before starting either supplement.

Pablo Vicento
Written by

Pablo Vicento

Liked this? There's more where it came from.

Get our digest — articles worth your time, no spam, unsubscribe in one click.

Subscribe to Factnetize →

Leave a comment

Your email address will not be published. Required fields are marked *

Weekly · No spam

Get smarter,
one Sunday at a time.

Join our weekly digest — the articles worth your time, plus one thing that made us think differently.