Magnesium vs Melatonin for Sleep: Which Is Better? (2026)

Affiliate links: as an Amazon Associate and through other programs, we earn from qualifying purchases, at no extra cost to you. Learn more.

Reviewed October 20266 min readEvidence-basedBy Víctor, founder · How we work
Amber supplement bottle and three capsules on a wooden table

Magnesium and melatonin work in different ways. Melatonin is a hormone your brain makes in response to darkness, and it helps set the timing of your body clock (NCCIH). Magnesium is a mineral you need every day: 400 to 420 mg for men and 310 to 320 mg for women, counting food (NIH Office of Dietary Supplements). Neither is a strong sleeping pill. Here is what the trials found for each.

What the Trials Found

Melatonin: a small effect on everyday sleep, more useful for jet lag

A meta-analysis of 19 trials with 1,683 people with primary sleep disorders found that melatonin helped them fall asleep about 7 minutes faster and sleep about 8 minutes longer than placebo, with a small gain in sleep quality. The authors called the effects modest and smaller than those of prescription sleep drugs (Ferracioli-Oda et al., 2013). For chronic insomnia, the American Academy of Sleep Medicine suggests that doctors not use melatonin, a weak recommendation (Sateia et al., 2017).

Magnesium glycinate compared: label doses (2026)

ProductOn the labelGood to knowBuy
Our pick
Doctor's Best High Absorption Magnesium
200 mg magnesium per 2 tablets, as lysinate glycinate chelate (Albion)Chelated glycinate at a dose inside the 350 mg a day limit for supplements (NIH).See it on Amazon ↗
Nature Made Magnesium Glycinate200 mg magnesium per 2 capsulesThe same dose in capsules instead of tablets.See it on Amazon ↗
NOW Magnesium Glycinate200 mg magnesium per 2 tablets, as bisglycinate (Albion)Another bisglycinate tablet at the same dose.See it on Amazon ↗
Pure Encapsulations Magnesium (Glycinate)120 mg magnesium per capsuleA smaller dose per capsule: 1 or 2 capsules stays under 350 mg.See it on Amazon ↗

Most adults need no more than 350 mg a day of magnesium from supplements (NIH).

Label figures: NIH Dietary Supplement Label Database and the brand listing, checked October 2026. Formulas change, so check the label before you buy. We earn a commission on Amazon purchases at no extra cost to you, and we do not lab-test products.

Jet lag is where melatonin does best. In a Cochrane review, 9 of 10 trials found that melatonin taken close to the target bedtime at the destination reduced jet lag after flights across five or more time zones. Doses of 0.5 to 5 mg worked about equally, 5 mg helped people fall asleep faster, and doses above 5 mg were no better. Taken at the wrong time, early in the day, it can cause sleepiness and slow adaptation (Herxheimer and Petrie, 2002).

🆕 Free Download

Get our free supplement cheat sheet.

One page: typical doses, timing and upper limits for ten well-studied supplements. No upsell.

🔒 No spam. Unsubscribe anytime. We send 1-2 emails/month max.

For night-shift workers, 1 to 10 mg after a night shift may add about 24 minutes of daytime sleep, based on low-quality evidence from 7 trials with 263 people, and it did not shorten the time needed to fall asleep (Liira et al., 2014). Low doses can work: in evening tests, 0.3 mg or 1 mg shortened the time to fall asleep without a hangover the next morning (Zhdanova et al., 1995).

Magnesium: small trials of low quality

A meta-analysis of 3 trials in 151 older adults with insomnia found that magnesium shortened the time to fall asleep by about 17 minutes compared with placebo. The 16-minute gain in total sleep was not statistically significant, and the evidence was rated low to very low quality (Mah and Pitre, 2021). In one trial, 46 older adults took 500 mg of magnesium a day for 8 weeks, more than the 350 mg upper limit for supplements, and their insomnia scores improved (Abbasi et al., 2012).

Magnesium glycinate and magnesium L-threonate

In 155 adults with poor sleep, 250 mg of magnesium a day as magnesium bisglycinate lowered insomnia scores a little more than placebo after 4 weeks (3.9 vs 2.3 points). The effect was small, and people who ate less magnesium seemed to benefit more (Schuster et al., 2025). In 80 adults with sleep problems, 1 g a day of magnesium L-threonate for 21 days improved deep and REM sleep scores measured with a ring tracker, but the trial was short and half of its authors worked for a commercial company (Hausenblas et al., 2024). We found no trials comparing the forms head to head.

Magnesium vs Melatonin Compared

💊
Dosage Quick Reference
At a glance: forms and doses
Best Form
Glycinate
Gentle on the stomach; citrate has more absorption data
General Dose
200-350mg
Elemental magnesium per day
Sleep Dose
200-350mg
Any time of day; no trial shows timing matters
Split Dose
200-300mg
Morning + evening split
Timing
Any time
With food if it upsets your stomach
⚠️ Do not take more than 350 mg a day of elemental magnesium from supplements unless your doctor advises it. More often causes diarrhea, and people with kidney disease should ask a doctor first.
QuestionMagnesiumMelatonin
What it isA mineral your body needs every dayA hormone that helps time your body clock
Best evidenceAbout 17 minutes faster sleep onset in 3 small, low-quality trials in older adultsJet lag after flights across 5 or more time zones; about 7 minutes faster sleep onset in sleep disorders
Doses in trials250 to 500 mg a day; stay at or below 350 mg a day from supplements0.3 to 5 mg; above 5 mg was no better for jet lag
When it was takenOnce a dayIn the evening, or close to bedtime at your destination
Main cautionsDiarrhea; kidney disease; some antibiotics and osteoporosis drugsDaytime sleepiness; epilepsy and blood thinners; inaccurate labels

Every figure in this table comes from the studies and fact sheets linked in this article.

Taking Magnesium and Melatonin Together

One trial tested them together. In 43 nursing home residents with insomnia, average age 78, a nightly mix of 5 mg of melatonin, 225 mg of magnesium and 11.25 mg of zinc for 8 weeks improved sleep quality scores and total sleep time compared with placebo (Rondanelli et al., 2011). Because all three were given together, the trial cannot show which one helped. We found no trial of magnesium glycinate plus melatonin.

For long-term insomnia: the American College of Physicians recommends cognitive behavioral therapy for insomnia (CBT-I) as the first treatment for all adults with chronic insomnia (Qaseem et al., 2016). Supplements are not a substitute for it.

How to Choose a Product

  • Melatonin labels are often wrong. In a 2023 lab test of 25 melatonin gummies, 22 were inaccurately labeled, the amount ranged from 74% to 347% of the label, and one contained no melatonin but did contain CBD (Cohen et al., 2023). In an earlier test of 31 melatonin supplements, content ranged from 83% below to 478% above the label, and 26% contained serotonin (Erland and Saxena, 2017).
  • Start with a low melatonin dose. Doses of 0.3 mg and 1 mg worked in evening tests (Zhdanova et al., 1995), and for jet lag, doses above 5 mg were no more effective (Herxheimer and Petrie, 2002).
  • Check the magnesium dose. Stay at or below 350 mg a day from supplements. Magnesium carbonate, chloride, gluconate and oxide are the forms most often reported to cause diarrhea (NIH Office of Dietary Supplements). The glycinate trial used 250 mg of magnesium a day (Schuster et al., 2025).
  • Look for an independent testing seal, which checks that a product contains the labeled amounts (NIH Office of Dietary Supplements).

Safety, Side Effects and Medicines

  • Magnesium: high doses from supplements can cause diarrhea, nausea and stomach cramps, and the risk of too much magnesium rises with kidney disease. Take osteoporosis drugs called bisphosphonates at least 2 hours apart from magnesium, and take tetracycline or quinolone antibiotics at least 2 hours before or 4 to 6 hours after it (NIH Office of Dietary Supplements).
  • Melatonin: short-term use appears safe for most people, but long-term safety is not known. People with epilepsy or on blood thinners need medical supervision, safety in pregnancy and breastfeeding has not been studied, and older people may feel drowsy the next day (NCCIH).
  • Children: reports of melatonin ingestion by children and teens rose 530% from 2012 to 2021. Five children needed a breathing machine and two died (Lelak et al., 2022). Keep gummies out of reach, and ask a doctor before giving melatonin to a child.
See a doctor if poor sleep lasts. Chronic insomnia has an effective first treatment, cognitive behavioral therapy for insomnia (Qaseem et al., 2016), and a doctor can check for other causes.

The Bottom Line: Magnesium or Melatonin

⭐ Our Verdict
Our Verdict on Magnesium Glycinate

Magnesium glycinate is gentle on the stomach, although citrate has the stronger absorption data. Small trials suggest it may help some people fall asleep a little faster, but the evidence is low quality. Stay within 350 mg of elemental magnesium a day from supplements, and ask your doctor first if you have kidney disease.

See Our Top Pick on Amazon →Affiliate link: we may earn a commission at no extra cost to you

Neither is a strong sleep aid. Melatonin helped people with sleep disorders fall asleep about 7 minutes faster (Ferracioli-Oda et al., 2013) and works best for jet lag (Herxheimer and Petrie, 2002). Magnesium trials are few, small and of low quality (Mah and Pitre, 2021). For chronic insomnia, CBT-I comes first (Qaseem et al., 2016).

  • For jet lag, try 0.5 to 5 mg of melatonin close to bedtime at your destination.
  • If you try magnesium for sleep, stay at or below 350 mg a day from supplements.
  • Expect small effects, and stop if a product does not help after a few weeks.
Which to choose: melatonin if your problem is jet lag (Herxheimer and Petrie, 2002); magnesium only as an experiment within the 350 mg limit (NIH Office of Dietary Supplements).

Level up your recovery

Cold plunges, saunas and red light are popular recovery tools. Our buying guides compare the options:

📖
Scientific References
  • 1Abbasi B, et al. (2012). The effect of magnesium supplementation on primary insomnia in elderly: A double-blind placebo-controlled clinical trial. J Res Med Sci. PMID 23853635
  • 2Tarleton EK, et al. (2017). Role of magnesium supplementation in the treatment of depression: A randomized clinical trial. PLoS ONE. PMID 28654669
  • 3Zhang Y, et al. (2017). Can Magnesium Enhance Exercise Performance?. Nutrients. PMID 28846654
  • 4Veronese N, et al. (2020). Magnesium and health outcomes: an umbrella review. Eur J Nutr. PMID 30684032
  • 5Wienecke E, Nolden C. (2016). Long-term HRV analysis shows stress reduction by magnesium intake. MMW Fortschr Med. PMID 27933574

All studies are peer-reviewed and sourced from PubMed/NCBI. This article is for informational purposes only and does not constitute medical advice. Consult a qualified healthcare provider before starting any supplement regimen.

❓Frequently Asked Questions
Magnesium glycinate is a common choice for sleep because it is gentle on the stomach, but trials show only a modest benefit. A 200 to 350 mg dose of magnesium glycinate carries roughly 1.2 to 2.2 g of glycine, less than the 3 g used in glycine sleep studies, and magnesium L-threonate has only a few small, industry-funded human trials, one of them testing a mix of ingredients. Avoid magnesium oxide for sleep: it is poorly absorbed (about 4% in one study) and mainly acts as a laxative.
Yes, within the limit: up to 350 mg a day of supplemental magnesium is considered safe for healthy adults (NIH Office of Dietary Supplements). Healthy kidneys clear the excess, so people with kidney disease should ask their doctor first. Magnesium from food does not count toward that limit.
There is no reliable timeline. A 2017 systematic review found only weak, low-quality evidence that magnesium helps mild anxiety, and the studies lasted several weeks. Magnesium is not a treatment for anxiety disorders; if anxiety affects your daily life, talk to a doctor.
Only sometimes. A 2020 Cochrane review found magnesium unlikely to prevent typical night-time leg cramps in older adults, and results in pregnancy are mixed. It may help if your intake is low. If cramps are frequent, check your diet and talk to your doctor; if you try magnesium, stay within 350 mg a day from supplements.
No trial shows that timing matters, so take it when you will remember, for example with dinner. Claims that magnesium raises melatonin are not established in people. Taking it with food can reduce stomach upset.
Rich sources include pumpkin seeds (156 mg per ounce), chia seeds (111 mg per ounce), almonds (80 mg per ounce), cooked spinach (78 mg per half cup) and black beans (60 mg per half cup), according to the NIH. Adults need 310 to 420 mg a day, and dietary surveys show many Americans get less than that, so add a few of these foods before reaching for a supplement.