Back to articles
Comparative guide · 7 min read

Melatonin vs magnesium glycinate — which is better for sleep?

Updated 2026-05-09 · Reviewed by SupplementScore editors · No sponsorships

These two are the most-recommended over-the-counter sleep supplements, but they fix different problems. Melatonin is a circadian-rhythm signal — its job is to tell your brain it's biological night. Magnesium glycinate is a neuromuscular and stress-axis modulator — its job is to dampen the arousal that's keeping you awake. Pick the wrong one for your problem and the result feels like the supplement "didn't work".

Quick verdict

Sleep complaintBetter choiceWhy
Jet lag, shift work, delayed sleep phase Melatonin Phase-shifting effect is what melatonin uniquely does. 0.3–0.5 mg taken 4–6 hours before target bedtime advances circadian rhythm.
"Tired but wired" — racing thoughts at bedtime Magnesium glycinate Glycine is a calming co-agonist; magnesium downregulates NMDA-type excitatory signalling. Best fit for anxiety-driven insomnia.
Sleep fragmentation / waking at 3am Magnesium glycinate Standard immediate-release melatonin clears the blood in 1–2 hours and rarely improves middle-of-the-night awakenings. Magnesium has indirect support for sleep continuity.
Sleep onset > 30 min in older adults Melatonin (low dose) Endogenous melatonin declines with age. 0.5–2 mg has the cleanest evidence in adults >55. Higher doses don't add benefit.
Generic, low-stakes sleep support — first try Magnesium glycinate Tier 1, 4/5 evidence, very high safety; addresses likely magnesium insufficiency in the diet at the same time.

How they compare on the things that matter

Mechanism — they're not redundant

Melatonin is a hormone produced by the pineal gland in response to darkness. Supplemental melatonin acts on MT1 and MT2 receptors in the suprachiasmatic nucleus (the brain's master clock) to either reinforce a normal evening signal or shift the clock to a new time zone. It is not a sedative — at the right time, in the right dose, it nudges the circadian system; at the wrong time it can make sleep worse.

Magnesium glycinate provides two active components. Magnesium is a cofactor in over 300 enzymatic reactions; relevant to sleep, it modulates GABAergic inhibition and downregulates NMDA-type glutamate signalling, which together reduce neuronal excitability. Glycine, the carrier amino acid, has independent evidence for promoting sleep onset at higher doses (3 g) and works as a calming co-agonist at the glycine site of the NMDA receptor.

Evidence base

Side effects and tolerance

Melatonin can cause vivid dreams, morning grogginess (especially at doses >1 mg), and — confusingly — daytime sleepiness if mistimed. There is no convincing evidence of long-term tolerance or dependence at standard doses, but the supply chain is known to be lax: a 2023 JAMA analysis of melatonin gummies found actual dose ranged from 74% to 347% of the labelled value. Choose a third-party tested brand and start low.

Magnesium glycinate is among the best-tolerated forms of magnesium — most users handle 400 mg elemental without GI upset (whereas citrate and oxide reliably loosen stools at the same dose). The main interaction concern is timing: separate magnesium dosing by 2 hours from bisphosphonates, tetracyclines, or quinolones to avoid chelation interference.

Practical rule. If your problem is "I can't fall asleep until 2am no matter when I get into bed", you have a circadian problem — try low-dose melatonin first. If your problem is "I get into bed and my mind won't stop", you have an arousal problem — try magnesium glycinate first.

Stacking them

The two are mechanistically non-overlapping and stack cleanly. A common evidence-based combination is 0.3–0.5 mg melatonin taken 30–60 minutes before bed plus 200–400 mg elemental magnesium glycinate with the evening meal. There is no documented adverse interaction. The reason to start with one rather than both is diagnostic — you want to know which mechanism actually moved the needle for you.

What the price difference buys you

Both are inexpensive. A 60-day supply of low-dose melatonin runs about $8–15; a 60-day supply of magnesium glycinate at 400 mg/day runs about $15–25. The premium for "extended-release" or "time-release" melatonin (designed to address middle-of-the-night awakenings) is real — but the evidence base is thinner than for low-dose immediate-release for sleep onset.

Who should not take each

Melatonin should be used cautiously in autoimmune disease (theoretical immune-modulating concern), in adolescents (limited long-term data), and during pregnancy or lactation (not enough safety data). It can interact with sedatives, antidepressants, and warfarin. People on hormonal birth control may experience higher melatonin levels than expected.

Magnesium glycinate should not be supplemented without supervision in significant kidney disease (eGFR < 30) — the kidneys clear magnesium, and impaired clearance can produce hypermagnesemia. Otherwise it is among the most universally safe supplements available.

What we'd actually buy

For circadian misalignment (jet lag, shift work, persistent late sleep): 0.3–0.5 mg melatonin from a USP-Verified or NSF-tested brand, taken 4–6 hours before target sleep time for phase-shifting, or 30 minutes before bed for routine support in older adults. Skip the 5 mg and 10 mg gummies — more is not better and over-dosing is associated with worse next-day grogginess.

For stress-related sleep, muscle tension, or general sleep support: 200–400 mg elemental magnesium glycinate with dinner. Brands matter less here than the elemental dose on the label — many "magnesium glycinate" products list the gross compound weight, which dramatically overstates the effective dose.

Sources