Health
September 1, 2026

Magnesium and Sleep: Does It Help With Insomnia and Muscle Relaxation?

Written by:
Sara Bratscher
Reviewed by:
Svetlana Milanov

Magnesium and Sleep: Does It Help With Insomnia and Muscle Relaxation?

Magnesium is one of the key minerals involved in normal nervous system and muscle function and in stress regulation, which is why it is often linked to sleep quality. In practice, many people turn to magnesium supplements for difficulty falling asleep, frequent nighttime awakenings, or nocturnal muscle cramps, but the key question is - what does the scientific evidence actually show? [1], [2]

‍

How Does Magnesium Affect Sleep - Physiological Mechanisms

Magnesium is involved in regulating neuronal excitability and the balance between excitatory and inhibitory signals in the brain. More specifically:

  • Magnesium acts as a natural antagonist of NMDA receptors, helping reduce excessive neural stimulation and supporting relaxation. [3]
  • It influences the GABA system (gamma-aminobutyric acid), the brain’s primary inhibitory neurotransmitter involved in calming neural activity and initiating sleep. [4]
  • It contributes to cortisol regulation (the stress hormone), and elevated evening cortisol may make it harder to fall asleep. [1], [5]

Because of these mechanisms, magnesium is theoretically considered helpful for falling asleep and supporting deeper sleep, particularly in people with magnesium deficiency. [1]

‍

Magnesium and Insomnia - What Do Clinical Studies Show?

Most of the available data come from older adults and people with documented sleep disorders.

A randomized, double-blind study in older adults with insomnia found that magnesium supplementation (500 mg/day for 8 weeks) was associated with:

  • shorter time to fall asleep,
  • longer total sleep duration,
  • fewer nighttime awakenings,
  • lower cortisol levels. [2]

A 2021 systematic review suggests that magnesium may shorten sleep onset time in older adults with insomnia, but the quality of the available evidence is low and the results are not robust enough to support broad recommendations. [7]

It is important to note that in people without magnesium deficiency, the effect may be weaker or absent, which helps explain why magnesium does not work equally well for everyone. [1], [2]

‍

Magnesium and Muscle Relaxation at Night

Nighttime calf cramps, muscle twitches, and feelings of muscle tension are often associated with electrolyte disturbances, including magnesium. [1]

Magnesium:

  • regulates calcium entry into muscle cells, helping muscles relax after contraction, [3]
  • reduces neuromuscular hyperexcitability, [1]
  • may reduce muscle tension and the subjective sensation of “restless legs,” although evidence for restless legs syndrome (RLS) is not always consistent. [7], [8]

In people with nighttime cramps and low magnesium intake, supplementation may reduce the frequency and severity of cramps, indirectly improving sleep. [1], [8]

‍

Which Form of Magnesium Is Best for Sleep?

For sleep and relaxation, forms with good absorption and minimal laxative effect are generally preferred:

  • Magnesium glycinate - a common choice for insomnia, stress, and tension because of its good tolerance and mild calming effect. [1], [5]
  • Magnesium citrate - may be helpful, but in some people it can cause diarrhea, which may disrupt sleep. [1]
  • Magnesium oxide - is less well absorbed and is not an optimal choice for sleep-related concerns. [1]

‍

When and How Should Magnesium Be Taken for Better Sleep?

Different dosing regimens have been used in studies. A recent randomized, placebo-controlled trial of magnesium bisglycinate used 250 mg of elemental magnesium daily, taken 30-60 minutes before bedtime, while older studies also used higher daily doses. [2], [6]

The upper safe limit for magnesium from supplements is 350 mg/day because of the risk of diarrhea; magnesium obtained from food is not included in this limit. [1]

‍

When Is Magnesium Unlikely to Help?

Magnesium is not a “treatment for insomnia” and is unlikely to have a major effect when insomnia is caused by:

  • severe anxiety or depressive disorders,
  • sleep apnea,
  • poor sleep hygiene (late-night screen use, caffeine in the evening),
  • hormonal disorders. [2], [7]

In these situations, magnesium may be supportive, but it is not the main solution. [2]

‍

Sources

[1] NIH Office of Dietary Supplements (ODS). Magnesium: Fact Sheet for Health Professionals. 2026.

https://ods.od.nih.gov/factsheets/Magnesium-HealthProfessional/

[2] Abbasi B, et al. The effect of magnesium supplementation on primary insomnia in elderly: A double-blind placebo-controlled clinical trial. 2012.

https://pmc.ncbi.nlm.nih.gov/articles/PMC3703169/

[3] Gröber U, Schmidt J, Kisters K. Magnesium in Prevention and Therapy. 2015.

https://pmc.ncbi.nlm.nih.gov/articles/PMC4586582/

[4] Barbagallo M, et al. Magnesium in Aging, Health and Diseases. 2021.

https://pmc.ncbi.nlm.nih.gov/articles/PMC7912123/

[5] Boyle NB, Lawton C, Dye L. The Effects of Magnesium Supplementation on Subjective Anxiety and Stress - A Systematic Review. 2017.

https://pmc.ncbi.nlm.nih.gov/articles/PMC5452224/

[6] Schuster J, Cycelskij I, Lopresti A, Hahn A. Magnesium Bisglycinate Supplementation in Healthy Adults Reporting Poor Sleep: A Randomized, Placebo-Controlled Trial. 2025.

https://pmc.ncbi.nlm.nih.gov/articles/PMC12412596/

[7] Mah J, Pitre T. Oral magnesium supplementation for insomnia in older adults: a systematic review. 2021.

https://pmc.ncbi.nlm.nih.gov/articles/PMC8053283/

[8] Garrison SR, et al. Magnesium for skeletal muscle cramps. 2020.

https://www.cochranelibrary.com/cdsr/doi/10.1002/14651858.CD009402.pub3/full

‍

Health Disclaimer: This content is for educational and informational purposes only and is not a substitute for professional medical advice, diagnosis, or treatment. Always consult a qualified healthcare professional before starting or changing any supplement, especially if you are pregnant, breastfeeding, have a medical condition, or take medication.

‍

Explore more articles

Browse all posts