Does magnesium help you sleep?

While not everyone has a sleep disorder, most people could benefit from more sleep. Seven to nine hours of sleep is the recommended amount each night. Good sleep hygiene—limiting caffeine, using blackout curtains, and avoiding screens—can help, but what about magnesium?
Nearly 50% of American adults and children do not consume enough magnesium. This essential mineral plays roles in nerve and muscle function, blood sugar control, bone development, and heart health.
Magnesium supplementation may also help with sleep disorders like insomnia and restless leg syndrome (RLS), as well as mental health conditions that make it hard to sleep. Some evidence suggests it calms the central nervous system by increasing the neurotransmitter GABA and inhibiting NMDA receptors, promoting muscle relaxation.
Insomnia, trouble falling or staying asleep, can reflect disrupted melatonin regulation. Magnesium helps regulate melatonin and the sleep–wake cycle. A 2019 study found that magnesium plus B complex and melatonin improved sleep quality in people with insomnia, though other studies in older adults showed mixed results.
Because randomized trials are limited, magnesium cannot be universally recommended for sleep support. Consult your healthcare provider before starting a supplement.
Benefits of magnesium
- Better exercise performance
- Reduced anxiety and depression symptoms
- Improved blood sugar management
- Heart health and blood pressure support
- Bone health
- Migraine prevention
- PMS symptom relief
- Insomnia relief
- Preeclampsia and eclampsia management
Dietary sources of magnesium
Leafy greens, legumes, nuts, seeds, and whole grains are rich in magnesium. Examples:
- Pumpkin seeds, roasted, 1 oz (37% DV)
- Chia seeds, 1 oz (26% DV)
- Almonds, dry roasted, 1 oz (19% DV)
- Spinach, boiled, ½ cup (19% DV)
- Cashews, dry roasted, 1 oz (18% DV)
- Peanuts, oil roasted, ¼ cup (15% DV)
- Shredded wheat cereal, 2 biscuits (15% DV)
- Soymilk, 1 cup (15% DV)
- Dark chocolate, 1 oz (15% DV)
- Black beans, cooked, ½ cup (14% DV)
- Edamame, cooked, ½ cup (12% DV)
- Peanut butter, 2 Tbsp (12% DV)
- Baked potato with skin, 3.5 oz (10% DV)
- Brown rice, cooked, ½ cup (10% DV)
- Yogurt, plain low fat, 8 oz (10% DV)
- Fortified cereals, 1 serving (10% DV)
- Instant oatmeal, 1 packet (9% DV)
- Kidney beans, canned, ½ cup (8% DV)
- Banana, 1 medium (8% DV)
Types of magnesium supplements
- Magnesium citrate: raises levels and acts as a laxative
- Magnesium oxide: treats constipation and indigestion
- Magnesium chloride: well absorbed, used orally or topically
- Magnesium sulfate: Epsom salt for baths
- Magnesium glycinate: may support relaxation and sleep
- Magnesium lactate: used as a food additive
- Magnesium malate: gentle absorption, may help fatigue
- Magnesium taurate: limited evidence for heart support
Side effects of magnesium supplementation
Common:
- Nausea
- Diarrhea
- Vomiting
- Abdominal cramping
Excessive intake can cause:
- Low blood pressure
- Slowed heart rate
- Confusion
- Difficulty breathing
- Coma
- Arrhythmias
- Cardiac arrest
- Death
Best form for sleep
Magnesium glycinate is often chosen for sleep support because it may promote relaxation via the amino acid glycine. Choose a third‑party tested brand without unwanted additives.
Risk factors for deficiency
- Celiac or Crohn’s disease
- Type 2 diabetes
- High alcohol or caffeine intake
- Older age
- Medications like proton pump inhibitors or certain antibiotics
- Parathyroid disorders
- Kidney disease
Sources
- Arab A, Rafie N, Amani R, Shirani F. The role of magnesium in sleep health. Biol Trace Elem Res. 2023.
- Magnesium. NIH Office of Dietary Supplements. Accessed Sept 19, 2024.
- Marshall NS, et al. Magnesium for restless legs syndrome. Sleep Med Rev. 2019.
- Magnesium: NIH Fact Sheet. Accessed Sept 19, 2024.
- Gröber U, et al. Magnesium in prevention and therapy. Nutrients. 2015.
- Allen MJ, et al. Magnesium. NLM. Accessed Sept 19, 2024.