Health Daily Advice
Body & conditions · Sleep

Is Magnesium Good for Sleep? What the Research Says

Magnesium is linked to calmer nerves, melatonin, and muscle relaxation — but does it actually improve sleep? Here is what small trials found, who is most likely to benefit, and the safety rules to know first.

Published
Reading time
4 minutes
Sources
8 cited
Woman sleeping peacefully in a moonlit bedroom with almonds and milk on the bedside table — magnesium-rich foods that may support restful sleep
In this guide

Magnesium may help some people sleep better, especially those who do not get enough of it. It calms the nervous system and supports melatonin, and small trials found it can shorten the time it takes to fall asleep. The overall evidence is thin and low quality, and supplements are not for everyone. Talk to your doctor before trying them.

How magnesium affects sleep

Magnesium plays a role in several body processes tied to sleep. A Sleep Foundation review notes that magnesium appears to affect brain chemicals involved in relaxation and tiredness, including GABA, melatonin, serotonin, and cortisol, though experts have not pinned down the exact mechanisms. A 2025 review in Nature and Science of Sleep describes magnesium as a natural NMDA-receptor antagonist and GABA agonist, meaning it may quiet excitatory brain signals while boosting the calming GABA pathway, which in turn may influence slow-wave sleep. Healthline summarizes the theory: magnesium may reduce nervous system excitability, regulate melatonin, and bind to GABA receptors — the same neurotransmitter system that sleep medications like Ambien act on.

Magnesium is also linked to muscle relaxation, and a shortage can cause muscle cramps that disturb sleep, according to the same review. And if nighttime leg cramps are the thing keeping you up, they deserve their own checkup — see why your legs cramp at night.

What the research actually shows

The most promising results come from small trials in older adults. In a 2012 double-blind trial of 46 elderly people with primary insomnia, participants who took 500 mg of elemental magnesium per day for 8 weeks slept longer, fell asleep faster, and scored lower on the Insomnia Severity Index than those on placebo, while their blood melatonin rose and cortisol fell. Another trial gave 100 adults with sleep complaints 320 mg of magnesium citrate daily for 7 weeks and saw overall sleep-quality scores improve.

Pooled results look modest: a 2021 systematic review of 3 randomized trials in 151 older adults found magnesium cut the time to fall asleep by about 17 minutes and added about 16 minutes of total sleep versus placebo. But Healthline adds an important caution: the improvements were not statistically significant and the evidence was rated low quality, so better trials are still needed. A 2022 systematic review of 9 studies and 7,582 participants found an association between higher magnesium intake and better sleep-quality measures, though most of the experimental evidence remains small.

That is why experts stay cautious. Cleveland Clinic sleep specialist Dr. Naoki Umeda puts it plainly: “Overall, the evidence for magnesium as a sleep aid is thin. But some people find it helps them… Most of the studies on sleep and magnesium are small, and the overall evidence is lacking.” The Sleep Foundation’s key takeaway is similar: research suggests magnesium may help some people, particularly those with low magnesium levels, but more research is needed. Context matters too — a global survey cited in the 2025 review found 56% of U.S. respondents reported sleep disturbances, so interest in gentle sleep support is no surprise.

Infographic: how magnesium may help sleep — calms the brain, relaxes muscles, regulates melatonin, lowers cortisol, eases leg cramps, and is best obtained from food first
Ways magnesium is thought to support sleep (Source: Sleep Foundation, Cleveland Clinic)

How much magnesium you need

The U.S. National Institutes of Health sets the recommended dietary allowance at 400–420 mg per day for adult men and 310–320 mg per day for adult women. But many people fall short: an analysis of NHANES 2013–2016 data found 48% of Americans of all ages consumed less magnesium from food and drinks than their estimated average requirement. The Sleep Foundation reports that nearly half of U.S. adults and children may not get enough. True deficiency is still uncommon in healthy people, because the kidneys conserve the mineral — but people over 65, those with type 2 diabetes or gut conditions such as Crohn’s disease or celiac disease, and people with alcohol dependence are at higher risk, according to the NIH.

Get it from food first

Experts generally recommend food sources before supplements. The NIH lists good options with per-serving amounts:

Food Magnesium per serving
Roasted pumpkin seeds 156 mg per ounce
Chia seeds 111 mg per ounce
Almonds 80 mg per ounce
Boiled spinach 78 mg per half cup
Cashews 74 mg per ounce

Green leafy vegetables, legumes, nuts, seeds, and whole grains are all solid sources, per the NIH fact sheet. Keep in mind that only about 30–40% of dietary magnesium is typically absorbed by the body.

Supplements: safety and side effects

Magnesium supplements are generally considered safe when taken at recommended doses, according to the Cleveland Clinic. The NIH sets a supplement-specific upper limit of 350 mg per day for adults; going above that can cause diarrhea, nausea, and stomach cramps, and very high doses can lead to dangerous magnesium toxicity. Magnesium from food is not a risk for healthy people because the kidneys flush out the excess.

Two cautions matter most. First, talk to your doctor before taking magnesium if you have chronic kidney disease or other kidney problems, since weakened kidneys can let magnesium build up to dangerous levels. Second, magnesium can interact with certain antibiotics, osteoporosis drugs, diuretics, blood pressure medications, and acid-reducing proton pump inhibitors. Different forms of magnesium also behave differently — for example, citrate and oxide are more likely to cause digestive side effects. Do not self-prescribe a dose: ask your doctor or pharmacist what is appropriate for you.

When to see a doctor

Occasional rough nights are common, but see a doctor if you have insomnia most nights for several weeks, rely on sleep aids to fall asleep, snore loudly or gasp in your sleep, or feel excessively tired during the day despite time in bed. Talk to your doctor or pharmacist before starting any magnesium supplement, especially if you take other medications or have kidney disease.

In an emergency call 911 (US), 999 (UK) or 112 (EU)

Frequently asked questions

Does magnesium really help you sleep?

Possibly, for some people. Small trials in older adults found magnesium supplements improved sleep duration and quality, and a 2021 review of three trials found it cut the time to fall asleep by about 17 minutes. But the gains were not statistically significant and the evidence was rated low quality. Experts, including a Cleveland Clinic sleep specialist, describe the overall evidence as thin, though some people find it helps.

Should I take magnesium for sleep?

Talk to your doctor or pharmacist first. Magnesium supplements are generally safe at recommended doses, but they are not right for everyone — people with kidney disease and those taking certain antibiotics, blood pressure drugs, or diuretics need medical guidance. Experts also recommend getting magnesium from food first, such as nuts, seeds, and leafy greens, before considering supplements.

What foods are high in magnesium?

Good sources include roasted pumpkin seeds (156 mg per ounce), chia seeds (111 mg per ounce), almonds (80 mg per ounce), boiled spinach (78 mg per half cup), and cashews (74 mg per ounce), according to the NIH. Green leafy vegetables, legumes, nuts, seeds, and whole grains are all solid choices. Note that only about 30 to 40 percent of dietary magnesium is typically absorbed.

Can magnesium cause side effects?

Yes, mainly at high doses. The NIH sets a supplement upper limit of 350 mg per day for adults; more than that can cause diarrhea, nausea, and stomach cramps, and very high doses can cause dangerous magnesium toxicity. People with chronic kidney disease are at particular risk because their kidneys cannot clear excess magnesium well, so they should only use supplements under medical supervision.

Who should not take magnesium for sleep?

People with chronic kidney disease or other kidney problems should avoid magnesium supplements unless a doctor approves, since excess magnesium can build up to dangerous levels. It can also interact with antibiotics, osteoporosis medications, diuretics, blood pressure drugs, and proton pump inhibitors. If you take any regular medication, check with your doctor or pharmacist before adding magnesium.

Sources

  1. Sleep Foundation: Magnesium for Sleep www.sleepfoundation.org
  2. He et al. The Mechanisms of Magnesium in Sleep Disorders. Nature and Science of Sleep, 2025 pmc.ncbi.nlm.nih.gov
  3. NIH Office of Dietary Supplements: Magnesium Fact Sheet for Health Professionals ods.od.nih.gov
  4. Cleveland Clinic: Magnesium for Sleep — Does It Really Work? health.clevelandclinic.org
  5. Healthline: Does Magnesium Help You Sleep Better? www.healthline.com

About the author

Health Daily Advice

Health Daily Advice: Read Latest Updates on Health News, Diet and Fitness Tips, Mental Health, Disease, Exercise, Medication, Yoga, Workout, Medicine, global health, Workout Moves, Mental and Physical Fitness, Obamacare, health insurance, Medicare, opioids, cancer, heart, medicine, healthy recipes, Covid, Vaccine and advice on losing weight and feeling great from HealthDailyAdvice.com

Our editorial policy

Try the tool

Not sure if it can wait?

Common causes and warning signs for 16 everyday symptoms.

Open the symptom guide

The weekly letter

One useful health read, every week.

No spam, no miracle cures. Unsubscribe in one click.