- 01Magnesium corrects a shortfall and works best in people who run low
The trials that showed a benefit enrolled mostly older adults with insomnia 3, a group that often eats too little magnesium 1. The leading explanation is that magnesium restores a brake on nerve firing that runs weak when levels are low, so expect little if your intake is already good, and never the overnight drowsiness of a sleeping pill.
Magnesium helps sleep modestly, and the people most likely to notice are those who were short on it. The best pooled evidence, a meta-analysis (one result combined from several trials) of 3 randomized trials in older adults, found magnesium shortened the time to fall asleep compared with placebo, and the reviewers rated that evidence low to very low quality 3. For the general facts on the mineral (what it does, food sources, deficiency), see the parent guide on magnesium. Below: what the research found, which form and dose the label should show, when to take it, and when to stop waiting.
What the magnesium sleep studies found, and how small they are
Three magnesium sleep studies get quoted on most supplement pages. Read side by side, they are small, short and run in specific groups, and the most-cited one used magnesium oxide, a form the body absorbs less well than citrate and other forms 1.
| Study | Who | What they took | Length | Result | Caveat |
|---|---|---|---|---|---|
| Abbasi 2012, randomized trial 2 | 46 older adults with insomnia, Iran | 500 mg a day of elemental magnesium (the magnesium itself, not the whole compound) as magnesium oxide | 8 weeks | Better insomnia score, more of the time in bed spent asleep, longer sleep and faster sleep onset; higher melatonin, lower cortisol | One small trial; participants likely had low intake; used oxide |
| Mah and Pitre 2021, meta-analysis 3 | 3 trials, 151 older adults | Oral magnesium, various doses | Varied | About 17 minutes faster sleep onset; total sleep time not clearly changed | Evidence rated low to very low quality |
| Hausenblas 2024, randomized trial 4 | 80 adults with self-reported sleep problems | 1 g magnesium L-threonate a day (about 75 mg elemental) | 21 days | Better deep and REM sleep scores on a wearable ring; some daytime gains | Industry funded; wearable scores, not a sleep lab |
Magnesium has a small, consistent effect on how fast older adults with insomnia fall asleep, and nobody has run a large trial in younger adults with ordinary sleep trouble. The Abbasi trial, the one behind most claims, gave magnesium oxide 2. Oxide is cheap and less bioavailable than other forms 1, yet the strongest sleep result to date came from it. Wearable deep and REM scores like those in the threonate trial are estimates; see what core sleep means on a ring or watch. If stress is what keeps you up, the lower cortisol in the Abbasi trial is one small result; how to lower cortisol covers what works better.
One more study gets cited for magnesium and sleep: in the CARDIA study of about 3,960 US adults, people with the highest magnesium intake were less likely to sleep under 7 hours, and their better sleep quality only just missed statistical significance 7. It is an observational study that measured intake from food and supplements by questionnaire, so it cannot show that a capsule helps or which form works.
How magnesium affects sleep
Magnesium acts like a brake on nerve signals. It sits in a receptor called NMDA, which responds to glutamate, the brain's main "go" signal, and stops it firing too easily. It also helps GABA-A receptors, the brain's "slow down" switches that many sleep drugs target. Low magnesium shows up as muscle cramps and involuntary muscle contractions 1, a sign of nerves firing too readily. The leading explanation is that topping magnesium up restores a brake that was failing, so the effect stops once levels are normal. That would explain why a person with plenty of magnesium feels little, and why magnesium glycinate does not make most people drowsy the way an antihistamine does.
Which magnesium is best for sleep: glycinate, threonate, citrate or oxide
Magnesium glycinate is the usual choice for sleep because it is gentle on the gut, which matters for a dose taken at night. Magnesium bisglycinate is the same compound under a different name. Glycinate is chosen for comfort. No study has shown it improves sleep more than oxide or citrate.
| Form | Elemental magnesium by weight | Elemental magnesium in 500 mg of the compound | Gut effect | Sleep evidence |
|---|---|---|---|---|
| Glycinate (bisglycinate) | About 14% | About 70 mg | Generally gentler on the gut | No dedicated sleep trial; chosen for tolerance |
| Citrate | About 16% | About 80 mg | Mild laxative at higher doses | Little direct sleep data |
| Oxide | About 60% | About 300 mg | Laxative; less bioavailable than other forms 1 | The 8-week insomnia trial 2 |
| L-threonate | About 7 to 8% | About 36 mg | Gentle | One 21-day industry-funded trial 4 |
Glycine, the amino acid bound to magnesium in glycinate, has its own sleep research. As LifeFrom's glycine page puts it, "all three small trials of about 3 grams before bed found better sleep on at least one measure, such as how rested people felt, so the grade is Limited." A typical glycinate serving delivers well under 1 gram of glycine, a small fraction of that amount.
How much magnesium for sleep: read the back of the label
The number on the front of a magnesium bottle is often the weight of the whole compound. The number that matters is elemental magnesium, usually printed in the supplement facts panel on the back.
Sleep supplements commonly give 100 to 350 mg of elemental magnesium a day, and the threonate trial used about 75 mg 4. Two federal numbers frame any dose. The recommended intake from all sources is 400 to 420 mg a day for adult men and 310 to 320 mg for adult women 1. The tolerable upper intake level for adults is 350 mg a day of magnesium from supplements and medicines, not counting food; it is a ceiling, not a target, and it is set to avoid diarrhea and stomach cramps, the first signs of too much supplemental magnesium 1. Magnesium in antacids and laxatives counts toward that 350 mg, and large doses from these products are the usual route to dangerous levels in people with kidney disease 1. The Abbasi trial gave 500 mg elemental magnesium 2, above that limit, so treat it as a research dose given under supervision. Going above 350 mg of supplemental magnesium is a decision for a clinician who knows your kidney function.
When to take magnesium for sleep: morning or night?
No trial has compared morning and evening magnesium for sleep, so there is no proven best time to take magnesium glycinate or any other form. Evening is the common convention, often 30 minutes to 2 hours before bed, because it fits a bedtime routine, and taking it at the same time each night makes it easier to keep up. Consistency matters more than the exact hour. High-dose zinc supplements can reduce magnesium absorption, so keep them apart 1.
Magnesium for sleep: when it fits
How long does magnesium take to work for sleep?
Any effect from magnesium builds slowly. The threonate trial measured sleep at 21 days 4 and the Abbasi trial at 8 weeks 2; neither reported results after a single night, and no published trial supports claims of improvement within 3 to 5 days. A fair plan is to take it nightly, track sleep for 2 weeks, look for a change by week 4, and decide at week 8.
- 1Nights 1 to 7Expect little change in the first week. Start a simple note each morning: roughly how long it took to fall asleep and how many times you woke. Loose stools are the most common side effect at higher doses; if they appear, check the dose or form with a pharmacist or clinician.
- 2Week 2Compare your notes: minutes to fall asleep, number of wake-ups, how groggy you feel in the morning. A wearable sleep trend works too.
- 3Week 4People who were low in magnesium are the most likely to notice a shorter time to fall asleep by now.
- 4Week 8Week 8 is the decision point, because the longest trial ran 8 weeks 2. No change means magnesium is probably not what your sleep is missing. Loud snoring with gasping or pauses in breathing, or nodding off while driving, needs a doctor now.
Who magnesium is most likely to help, and who should skip it
Magnesium for sleep is most likely to help people whose magnesium runs low: older adults (the group in the insomnia trials 23; the one trial in younger adults used threonate and wearable scores 4), people who eat few greens, nuts, seeds and whole grains, people with type 2 diabetes, heavy drinkers, people with gut conditions that cut absorption such as Crohn's or celiac disease, and people on loop or thiazide diuretics (water pills such as furosemide or hydrochlorothiazide) 1. Taking a proton pump inhibitor (stomach-acid pills such as omeprazole) for more than a year can also lower blood magnesium 1.
| Situation | What to know |
|---|---|
| Kidney disease or eGFR under 60 | Ask a clinician first; damaged kidneys cannot clear extra magnesium 1. Read your number on the eGFR calculator or the eGFR marker page. |
| Tetracycline or quinolone antibiotics | The NIH Office of Dietary Supplements advises taking these antibiotics at least 2 hours before or 4 to 6 hours after magnesium 1; confirm timing with your pharmacist or prescriber. |
| Bisphosphonates (bone-density drugs such as alendronate) | NIH ODS advises keeping them at least 2 hours apart from magnesium 1; confirm with your pharmacist. |
| Potassium-sparing diuretics (amiloride, spironolactone) | These can raise magnesium levels; ask your prescriber before adding a supplement 1. |
| Myasthenia gravis, heart block or a slow heart rhythm | Magnesium can worsen muscle weakness or heart conduction; ask your clinician first. |
| Pregnancy or breastfeeding | Ask your clinician; the recommended intake changes in pregnancy 1. |
Night leg cramps are often listed as a reason to take magnesium. A Cochrane review concluded that magnesium is unlikely to give clinically meaningful cramp prevention in older adults with muscle cramps 5. If cramps are what keep you up, read what causes leg cramps at night for the causes that tests can check. Restless legs point toward iron more than magnesium: the restless legs page notes that the 2024 AASM guideline "treats a ferritin of 75 ng/mL or less, or a transferrin saturation under 20%, as low for RLS, well above many labs' lower limits." See ferritin.
Should you test your magnesium first?
A blood test can flag a true deficiency, but a normal serum magnesium result (serum is the liquid part of your blood, which a standard blood test measures) does not prove your intake is fine. Less than 1% of the body's magnesium is in serum and about 50 to 60% is in bone, so the body holds serum magnesium steady by pulling from its stores 1. Magnesium is one of the electrolytes; see electrolytes, explained.
Serum magnesium: an example resultmmol/L
Markers to read beside magnesium for sleep
A low serum result is a finding to take to a clinician, since the causes range from diet to medicines to gut and kidney conditions; the magnesium deficiency page covers what a low level means.
Free, no accountRead your blood testHave a blood panel with magnesium, eGFR or ferritin on it? Read every line of it.Read my results
If magnesium is not working for your sleep: what to try next
Magnesium usually fails for one of two reasons: you were not low to begin with, or something else is driving the poor sleep. Loud snoring with gasping or pauses in breathing, or nodding off while driving, points to sleep apnea and needs a doctor now, not another supplement. Insomnia on 3 or more nights a week for 3 months or more is also a reason to see a clinician. Our why can't I sleep guide notes that "blood tests can't diagnose insomnia, but they can check a few less common medical causes: ferritin for the low iron linked with restless legs, glucose or HbA1c for diabetes that wakes you to pee, and TSH for an overactive thyroid."
ACP recommends that all adult patients receive cognitive behavioral therapy for insomnia (CBT-I) as the initial treatment for chronic insomnia disorder.American College of Physicians clinical practice guideline, Annals of Internal Medicine, 2016 6
| Option | Studied in | Strength of evidence |
|---|---|---|
| CBT-I (cognitive behavioral therapy for insomnia) | Chronic insomnia, 3 nights a week for 3 months or more | Strong; first-line per ACP 6 |
| Magnesium | People with low magnesium intake; older adults with trouble falling asleep (small trials) | Low; small trials 3 |
| Glycine | Poor sleepers, about 3 g before bed | Limited, per the glycine page |
| L-theanine | Stress and sleep quality, 200 to 400 mg a day | Limited, per the L-theanine page |
| Valerian | Trouble falling asleep | Mixed, per the valerian page |
CBT-I is a medical treatment for chronic insomnia. The supplements listed are not treatments for insomnia; the table shows only what small studies looked at, and persistent insomnia should be assessed by a clinician.
Other compounds studied for sleep
CalculatorSleep calculatorIf magnesium did not help, check whether your bedtime lines up with your wake time and sleep cycles.Work it out If sleep has not improved by week 8, start with CBT-I and the causes on the why can't I sleep page; the sleep hub has the rest.
Citations
- NIH Office of Dietary Supplements. Magnesium: Fact Sheet for Health Professionals.
- Abbasi 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 17(12):1161-9.
- Mah J, Pitre T (2021). Oral magnesium supplementation for insomnia in older adults: a systematic review and meta-analysis. BMC Complement Med Ther 21:125.
- Hausenblas HA et al. (2024). Magnesium-L-threonate improves sleep quality and daytime functioning in adults with self-reported sleep problems: a randomized controlled trial. Sleep Med X 8:100121.
- Garrison SR et al. (2020). Magnesium for skeletal muscle cramps. Cochrane Database Syst Rev.
- Qaseem A et al. (2016). Management of chronic insomnia disorder in adults: a clinical practice guideline from the American College of Physicians. Ann Intern Med 165(2):125-33.
- Zhang Y et al. (2022). Association of magnesium intake with sleep duration and sleep quality: findings from the CARDIA study. Sleep 45(4):zsab276.
Educational context only, not medical advice or a diagnosis. Always discuss your results with a clinician.





