The short answer. 200–300mg of magnesium glycinate, 30–60 minutes before bed, nightly for at least 2 weeks. Magnesium oxide is too poorly absorbed to bother with. Magnesium citrate works but tends to loosen stools at bed-relevant doses. Stop or reduce if you get GI side effects.
Why magnesium gets so much credit (and where the credit is real)
Magnesium is a cofactor in more than 300 enzymatic reactions in the body. Several of those reactions regulate GABA receptor sensitivity — the same neurotransmitter receptor that benzodiazepines and alcohol act on, only much more gently. Adequate magnesium = more responsive GABA signalling = easier nervous-system wind-down.
The supplement is also genuinely deficient in a lot of people. The USDA's NHANES surveys consistently show ~50% of US adults consume less than the RDA (310–420mg/day) of magnesium. Soil depletion has reduced magnesium content in vegetables ~25% over the last 50 years per Journal of the American College of Nutrition analyses.
The research sweet spot for sleep sits in the 200–500mg range, taken 30–60 minutes before bed, nightly. Below 100mg you're below the threshold that shows up in controlled trials. Above 500mg you're past diminishing returns and increasingly into GI side effects.
The most-cited sleep + magnesium study
Abbasi et al., 2012, Journal of Research in Medical Sciences: 46 older adults with self-reported insomnia, given 500mg magnesium daily for 8 weeks vs placebo. Outcomes:
- Sleep latency decreased by 17.36 minutes
- Sleep efficiency improved measurably
- Serum cortisol decreased
- Subjective sleep quality (PSQI score) improved
This is a small trial in older adults and doesn't directly translate to a 32-year-old knowledge worker. But the dose-response relationship has been consistent across follow-up studies — 2017 Magnesium Research and 2021 Nutrients meta-analyses have both supported magnesium's effect on sleep latency and quality, particularly when baseline magnesium status is suboptimal.
Form matters more than most people realize
This is where the cheap magnesium gummies fall apart. Magnesium oxide is the form in most discount supplement stacks — it's cheap and shelf-stable, but only about 4% bioavailable. The other 96% goes into your stool, often with osmotic side effects.
The forms that show up in sleep research:
| Form | Bioavailability | Sleep evidence | GI tolerance |
|---|---|---|---|
| Glycinate | High (~80%) | Strong — most-used in trials | Excellent |
| L-threonate | High; crosses blood-brain barrier | Promising for cognition + sleep | Good |
| Citrate | Moderate (~30%) | Decent | Loosens stools at >300mg |
| Malate | Moderate–high | Some evidence | Good |
| Oxide | Very low (~4%) | Weak | Causes diarrhea |
Glycinate is the most-researched form for sleep. L-threonate is interesting and shows up in newer sleep + cognition research — it crosses the blood-brain barrier more readily than other forms.
Dosing protocol that works for most adults
- Start at 200mg of magnesium glycinate (or 300mg of L-threonate), taken 30–60 minutes before bed, with a small amount of food.
- Take it nightly for at least 2 weeks before judging effect. Magnesium repletion is not an overnight thing.
- If no improvement at 2 weeks, increase the dose modestly.
- If GI side effects appear at any dose, drop back or split into two doses (one with dinner, one before bed).
- Cap at 400mg/day unless directed by a clinician. Higher doses occasionally worsen sleep — counter-intuitively — and the marginal returns are small.
Who should be careful
Kidney disease patients: Reduced kidney function impairs magnesium excretion. Talk to a doctor before supplementing.
Anyone on prescription medication, especially: blood pressure medication (magnesium can additively lower BP), quinolone or tetracycline antibiotics (magnesium reduces absorption), bisphosphonates, diuretics. In all cases, the issue is timing or interaction, not "you can't take magnesium" — but it's a doctor question, not a supplement-aisle question.
What about magnesium baths and sprays?
Transdermal magnesium (sprays, oils, Epsom salt baths) is genuinely calming, but the magnesium absorption through skin is much lower than oral routes despite the marketing. The benefit you feel from an Epsom salt bath is more likely the warm water + relaxation context than the magnesium itself.
Common questions
Can I take magnesium with melatonin? Yes — they work on different pathways and don't interact. Most people who try this combination eventually drop the melatonin once magnesium has had 2–3 weeks to build effect.
Will magnesium make me sleepy in the morning? No. Magnesium doesn't sedate you, so it doesn't carry over. It supports the sleep architecture you already have.
Is magnesium habit-forming? No. You can stop at any time without withdrawal.
How long until I notice anything? Some people feel calmer the first night. Most people notice sleep-quality changes by week 2. The magnesium-cortisol axis takes about 4 weeks to fully repattern.
Related reading
The Moonchild Team · Reviewed May 7, 2026