Magnesium & Sleep

Do you have trouble falling asleep?  This guide looks at magnesium’s four key roles in human sleep, and why magnesium deficiency is heavily linked with major sleep disorders.

  1. Magnesium relaxes our body before sleep.
  2. Magnesium reduces and prevents sleep disorders.
  3. Magnesium detoxifies, recycles, and improves memory during sleep.
  4. Magnesium maintains a healthy biological clock and sleep cycle.

The solutions section then looks at measures we can take to restore and maintain healthy magnesium levels which support deep restorative sleep.

1. Magnesium prepares our body for sleep

Magnesium relaxes our muscles

To fall asleep, there are certain internal requirements our body must meet. The most obvious is the relaxed state of our neuromuscular system. Think how hard it is to fall asleep right after a stressful event whose adrenaline spike has activated your muscles and nerves. Magnesium is essential to relax our muscles, and prevent over-excitation of our nerves:

Our muscles depend on a calcium/magnesium balance to contract and relax. When calcium is released from our muscle cells’ endoplasmic reticulum, it makes our muscles contract.

Magnesium is our body’s calcium antagonist.[1] More specifically in this case, it forces calcium back into the sarcoplasmic reticulum to let our muscles relax.

Magnesium calms our brain & nerves

Magnesium prepares our brain and nerves for sleep primarily by regulating our chemical messengers called neurotransmitters:

Glutamate is the main excitatory neurotransmitter that excites our nervous system and keeps us awake [6,7].  GABA on the other hand is the one that calms our brain [8], which helps us prepare for sleep. Magnesium regulates both of these to help us sleep:

First, it reduces glutamate’s excitatory effects by blocking its membrane receptor. [9-11] (Magnesium also protects us from the nerve damage caused by glutamate over-stimulation.)[12] 

Second, magnesium relaxes our brain and nerves because it helps our GABA neurotransmitters to function,[13-16] helping us calm down before sleep.[17] Simply put, magnesium is essential to relaxing our nerves and muscles in preparation for sleep.

1. Summary

It’s hard to fall asleep with tense and cramped muscles. Magnesium allows our muscles to relax before bed.

An overexcited brain (and nerves) also prevents sleep. Magnesium regulates glutamate and GABA neurotransmitters in favour of relaxation and sleep.

2. Magnesium helps with sleep problems:

Magnesium & restlessness

Magnesium also helps us fall asleep by synthesizing vitamin D, preventing iron toxicity and fighting inflammation. These three factors are necessary to prevent sleep problems like restless leg syndrome and sleep apnea.

In the past decade, it has been shown that up to 29% of adults in western populations experience sleep loss from restless leg syndrome, or RLS.[18,19] RLS is associated with 38 health conditions, 95% of which involve inflammation and immune problems.[20,21] This is why the main blood-test marker for inflammation (c reactive protein), is associated with RLS, [22] and why reducing inflammation lowers RLS symptoms.[23]

Vitamin D deficiency is also strongly associated with this sleep disorder[24-27], which is no surprise given that it has strong anti-inflammatory effects. [28-30] So how does magnesium help?

Magnesium makes Vitamin D

Cholesterol is converted into active vitamin D in our body via a three-step process that requires a set of enzymes belonging to the P450 family of enzymes.[31-34] This family of enzymes needs magnesium to function.[35]  (You can learn more about this on our magnesium & bones page.)

In addition to Vitamin D production, magnesium itself is also anti-inflammatory[36-40] which may in part be explained by its role in creating two of our most powerful antioxidants: glutathione and melatonin. We explore this further in Section 3, but first, let’s look at the other contributor to restless leg syndrome which magnesium alleviates:

Magnesium, iron toxicity & restlessness

Iron “deficiency” is strongly associated with restless leg syndrome[41-45], especially in our brain and nerves, the areas most capable of keeping us awake. Before we see how magnesium helps, we need to realize that iron deficiency is rare, and usually mistaken for iron misplacement:

Iron is meant to circulate in our blood and usually when blood tests show low iron, it isn’t because we don’t have enough iron, it’s because not enough of it is circulating in our blood, and is instead building up in our cells. What is one of the causes of this iron misplacement which is associated with RLS?

A lack of the enzyme ceruloplasmin, whose function is to load iron from our cells onto blood transport proteins in our blood. [46-48] Due to magnesium’s role in creating proteins  as well as its specific involvement in cerruloplasmin’s recycling [49], ceruloplasmin and the circulation of iron in our blood both depend on magnesium. Thus, low magnesium leads to iron buildup in our cells, because there isn’t enough ceruloplasmin to take the iron out of them. Why is this linked with sleep loss? Because iron buildup in our cells causes oxidative stress and inflammation [50,51]  (which explains why cerruloplasmin is associated with reducing inflammation)[52] and as we recall: inflammation is found in almost all RLS health conditions. 

Simply put, magnesium prevents RLS sleep loss by lowering inflammation and oxidative stress. It does this via production of vitamin D, ceruloplasmin, and our main sleep-enhancing anti-oxidant molecules, melatonin and glutathione:

Magnesium, glutathione & sleep apnea

Glutathione is our body’s most prevalent antioxidant which fights inflammation and oxidative stress in all areas of our body, [53-55] especially in our brain, whose high energy needs result in greater oxidative stress than other body parts. [56] We know inflammation and oxidative stress are linked with RLS sleep loss, thus glutathione helps our sleep that way. Yet a more serious sleep disorder associated with oxidative stress and low levels of glutathione and magnesium, is sleep apnea.[57-59]

Sleep apnea affects approximately 43 million adults in Canada and the U.S. combined,[60,61] and substantially more people exhibit symptoms and risk factors. Sleep apnea obstructs sleep, and is associated with hypertension, ischemic heart disease, irregular heart beat, heart failure, cerebrovascular disease, depression, and diabetes. [62-67] (All of these happen to be known symptoms of magnesium deficiency).

Oxidative stress, inflammation, and low glutathione all contribute to sleap apnea. Magnesium  fights inflammation & oxidative stress, and is required for glutathione production.[68-70] Simply put, we need healthy magnesium levels to prevent obstructive sleep apnea.

2. Summary

Magnesium helps with restlessness before sleep by combatting the two main contributors to this problem:

1. It fights inflammation via its role in vitamin D synthesis.

2. It prevents oxidative stress by preventing the toxic buildup of iron in our nervous (and other) cells.

Magnesium’s anti-inflammatory effects (via glutathione production) also help prevent obstructive sleep apnea, which can otherwise lead to debilitating conditions like heart disease.

3. Magnesium for youth & better memory:

Magnesium, DHEA, REM sleep, aging & skills

DHEA (Dehydroepi-androsterone) is a hormone made from cholesterol,[71] and its conversion also requires magnesium-dependent p450 enzymes. [35,72] While DHEA is linked to slowed aging and reproductive health, it also specifically benefits our sleep by increasing REM (rapid-eye-movement) sleep,[73] which is linked to reductions in age-related neurodegenerative diseases. REM sleep is also linked with the formation of memories involving emotions and developing skills.[74]

Besides REM sleep, DHEA also improves our energy, blood flow, immunity, body composition, bone metabolism, brain function, and most importantly it fights inflammation[75] (which we know is associated with sleep problems), further highlighting magnesium’s essentiality to healthy, memory-enhancing sleep.

Magnesium, deep sleep & memory

Magnesium itself also directly improves our sleep by reversing age-related sleep changes, the effects of which can increase memory formation:

When we sleep, much of our day’s experiences are turned into memories in our brain. This is essential for intelligence. From the 5 phases of a night’s sleep, the phase which is most associated with memory formation in youths and adults is the deep sleep phase [76-80] also known as slow wave sleep. Magnesium supplementation reverses age-related hormonal changes in a way which increases our deep, slow wave sleep, increasing the window of opportunity for memory formation.[81]

Slow wave sleep helps form memories, and…

…during this phase of sleep, the memories we form more of, are the ones based on those experiences which we thought we’d need to remember, while they were happening![82] In other words: when you’re learning something important that you want to convert into long-term knowledge, consciously tell yourself you will need this knowledge in the future!

By boosting deep sleep magnesium helps physically preserve our body, because deep sleep is the phase during which much of our physical and metabolic repair takes place.[83-86] Less deep sleep is also associated with insomnia.[79,87,88] Thus chronic magnesium deficiency can lead to a cycle of inflammation/oxidative stress + sleep loss, as well as biological aging of our organs from a lack of nightly repair.

Simply put, our body needs specific nutrients to perform the processes that keep us healthy and prevent sleep loss, and magnesium is needed for more of these processes than any other nutrient.[89] Given its vast roles in our physiology, it makes sense that magnesium is also involved in the timing of these biological processes, yet one thing that often slips our attention, is just how essential their timing is to our health:

3. Summary

By converting cholesterol into the youth hormone DHEA, magnesium boosts REM sleep which is when much of our memory formation occurs.

Magnesium suplementation also increases slow-wave sleep: the other phase of sleep where most memory formation occurs.

Magnesium’s sleep-enhancing effects also help with insomnia.

4. Magnesium, melatonin, insomnia & sleep cycles:

Our Circadian Rhythm

The vital processes that keep us alive are regulated in a 24 hour cycle.[90,91] A good way to grasp this is to look at the hormones our body uses to alter its physiological state: Different hormones excite us, calm us, make us feel great, boost our focus, make us stronger, make us sleepy, and so on. Each hormone’s production follows a 24 hour cycle.  Let’s look at the 24 hour cycle of the two hormones that most affect our sleep: cortisol and melatonin [92]:  

Cortisol (activates/prepares body for stress): Cortisol production is high in the morning and gradually decreases to low levels in the evening and night until it spikes again next morning.

Melatonin (promotes sleep and detox): Production is low during the day, rises at 8pm, spikes around midnight, and then drops down in the morning and waits to rise again at night.

Our body’s circadian rhythm is essential to good health. When it’s out of sync we experience inflammation, insomnia, and possibly major diseases if the effects last long enough. [93-96]

Magnesium, melatonin & insomnia

Nutrient availability, stress and light are the main factors that can disturb our circadian rhythm and sleep cycle, and magnesium regulates all of these: It’s needed for digestion & nutrient absorption, it helps our adrenals deal with stress, and it’s involved in the creation and healthy levels of the light-sensitive hormone: melatonin.[97-99]

Melatonin lets us fall asleep and is strongly tied to our circadian rhythm[100-104], however it also fights the inflammation and oxidative stress which contribute to sleep loss.[105-109] It comes as no surprise then, that melatonin & magnesium supplements help with insomnia[110] and that magnesium supplements alone also help with insomnia.[111] 

Magnesium and our biological clock:

Looking at all its roles in the requirements of sleep, magnesium resembles a master regulator of our circadian rhythm, which is what new research has found:

Our daily magnesium rhythm regulates the timekeeping of our cells [112] and magnesium deficiency is implicated with dysrhythmia: the disturbance of our circadian rhythm.[113]

Magnesium’s benefits also reach outside of regular sleep regulation, as it also helps us to both perform better and fall asleep at times when our body is deprived of sleep. [114]

Any way we look at it, magnesium is absolutely essential to healthy, restorative sleep.

4. Summary

Our body’s biological clock regulates the 24-hour cycle of hormones that keep us awake and help us sleep.

Magnesium’s central roles in these hormones and their bodily systems means it regulates our biological clock and sleep cycles.

Magnesium deficiency is linked to disturbed sleep cycles and insomnia.

Magnesium & melatonin supplements help reset our biological clock and reduce insomnia.


Healthy, restorative sleep is not possible without enough magnesium, because we need magnesium for every major component of sleep:

  1. It relaxes our brain, nerves and muscles before bed.
  2. It fights inflammation and oxidative stress to prevent restlessness and sleep apnea.
  3. It boosts REM and deep sleep for memory formation, mental function, and physical repair.
  4. It makes melatonin, helps with insomnia, and regulates our sleep cycle.

Sleep disorders are near all-time highs, and due to increased environmental stress and the depletion of magnesium in our food supply, magnesium deficiency is now epidemic.

Furthermore, experts now agree that it’s very difficult to get enough magnesium from diet alone, which makes supplementation an important part of a well-rounded approach to restoring healthy magnesium levels that support deep sleep.

Solutions to restore magnesium:

While restoring and maintaining healthy magnesium levels may not resolve your sleep issues on its own, based on magnesium’s essential roles in human sleep, it is still a major requirement for healthy restorative sleep.  A complete magnesium restoration protocol can include:

  • Reducing the environmental, psychological and physical stressors that deplete your magnesium. More specifically, eliminate your exposure to blue/artificial light several hours before sleep. They also directly inhibit sleepLearn more
  • Eat a magnesium-smart dietLearn more
  • Use a quality trans-dermal magnesium supplement to restore whole-body magnesium levels. Also, consider combining this with an oral magnesium-taurate or magnesium l-threonate supplement for  added mental support. Learn more


  1. Magnesium: Nature’s physiologic calcium blocker.
  2. Magnesium dependence of sarcoplasmic reticulum calcium transport.
  3. Effect of Magnesium on the Calcium-dependent Transient Kinetics of Sarcoplasmic Reticulum ATPase, Studied by Stopped Flow Fluorescence and Phosphorylation.
  4. Calcium efflux from cardiac sarcoplasmic reticulum: Effects of calcium and magnesium.
  5. The Binding of Calcium and Magnesium to Sarcoplasmic Reticulum Vesicles as Studied by Manganese Electron Paramagnetic Resonance.
  6. The role of glutamate in central nervous system health and disease–a review.
  7. Glutamate as a Neurotransmitter in the Brain: Review of Physiology and Pathology.
  8. GABA and glutamate in the human brain.
  9. Influence of external magnesium ions on the NMDA receptor channel block by different types of organic cations.
  10. The mechanism of magnesium block of NMDA receptors
  11. NMDA Receptor Function and Physiological Modulation
  12. Magnesium Sulfate Protects Against the Bioenergetic Consequences of Chronic Glutamate Receptor Stimulation.
  13. Magnesium potentiation of the function of native and recombinant GABA(A) receptors.
  14. Therapeutic sleep deprivation and magnesium: Modulators of the GABA/glutamate equilibrium.
  15. Magnesium in the Central Nervous System
  16. Magnesium in neuroses and neuroticism. Regional Centre of Public Health, Iasi, Romania
  17. Magnesium sulphate has GABA-Agonistic effects on sleep in healthy men.
  18. Prevalence of restless legs syndrome in North American and Western European populations: a systematic review.
  19. Epidemiology of restless legs syndrome: a synthesis of the literature.
  20. Restless legs syndrome–theoretical roles of inflammatory and immune mechanisms.
  21. Increased prevalence of restless legs syndrome in patients with Crohn’s disease.
  22. Elevated C-reactive protein is associated with severe periodic leg movements of sleep in patients with restless legs syndrome.
  23. Low-dose hydrocortisone in the evening modulates symptom severity in restless legs syndrome.
  24. The effect of vitamin D supplements on the severity of restless legs syndrome.
  25. An evaluation of sleep quality and the prevalence of restless leg syndrome in vitamin D deficiency.
  26. Possible association between vitamin D deficiency and restless legs syndrome.
  27. Serum 25-hydroxyvitamin D levels in restless legs syndrome patients.
  28. Vitamin D inhibits monocyte/macrophage proinflammatory cytokine production by targeting MAPK phosphatase-1.
  29. Inflammation and vitamin D: the infection connection.
  30. The Impact of Vitamin D Levels on Inflammatory Status: A Systematic Review of Immune Cell Studies.
  31. Cytochrome P450 enzymes in the bioactivation of vitamin D to its hormonal form (review).
  32. Overview of regulatory cytochrome P450 enzymes of the vitamin D pathway.
  33. Cytochromes P450 are essential players in the vitamin D signaling system.
  34. Cytochrome P450-mediated metabolism of vitamin D.
  35. Consider Magnesium Homeostasis: III: Cytochrome P450 Enzymes and Drug Toxicity.
  36. Magnesium Decreases Inflammatory Cytokine Production: A Novel Innate Immunomodulatory Mechanism.
  37. Magnesium sulfate increases intracellular magnesium reducing inflammatory cytokine release in neonates.
  38. Magnesium Intake in Relation to Systemic Inflammation, Insulin Resistance, and the Incidence of Diabetes.
  39. Dietary magnesium intake is inversely associated with serum C-reactive protein levels: meta-analysis and systematic review:
  40. Effects of oral magnesium supplementation on inflammatory markers in middle-aged overweight women.
  41. Ferritin subunits in CSF are decreased in restless legs syndrome.
  42. Is ferroportin-hepcidin signaling altered in restless legs syndrome?
  43. The role of iron in restless legs syndrome.
  44. Efficacy of oral iron in patients with restless legs syndrome and a low-normal ferritin: A randomized, double-blind, placebo-controlled study.
  45. Low brain iron content in idiopathic restless legs syndrome patients detected by phase imaging.
  46. The Role of Ceruloplasmin in Iron Metabolism.
  47. Multi-Copper Oxidases and Human Iron Metabolism.
  48. Biological effects of mutant ceruloplasmin on hepcidin-mediated internalization of ferroportin.
  49. Reconstitution of ceruloplasmin by the Cu(I)-glutathione complex. Evidence for a role of Mg2+ and ATP.
  50. Iron, Free Radicals, and Oxidative Injury.
  51. Ferrotoxic Disease: The Next Great Public Health Challenge.
  52. Role of ceruloplasmin in inflammation: increased serum ceruloplasmin levels during inflammatory conditions and its possible relationship with anti-inflammatory agents.
  53. Glutathione Metabolism and Its Implications for Health.
  54. Glutathione Homeostasis and Functions: Potential Targets for Medical Interventions.
  55. Glutathione and its role in cellular functions.
  56. Metabolism and functions of glutathione in brain.
  57. Oxidative stress in patients with obstructive sleep apnea syndrome.
  58. Oxidative stress and obstructive sleep apnea syndrome.
  59. Serum levels of magnesium and their relationship with CRP in patients with OSA.
  60. What is the Impact of Sleep Apnea on Canadians?
  61. Sleep Apnea Facts and Figures.
  62. Canadian Thoracic Society 2011 guideline update: Diagnosis and treatment of sleep disordered breathing.
  63. Association of sleep-disordered breathing, sleep apnea, and hypertension in a large community-based study. Sleep Heart Health Study.
  64. Prospective Study of the Association between Sleep-Disordered Breathing and Hypertension.
  65. Sleep-disordered breathing and cardiovascular disease: cross-sectional results of the Sleep Heart Health Study.
  66. Obstructive sleep apnea and type 2 diabetes: interacting epidemics.
  67. Obstructive Sleep Apnea as a Risk Factor for Stroke and Death.
  68. Glutathione Biosynthesis.
  69. Glutathione Synthesis in Human Erythrocytes.
  70. Effects of Glutathione on Red Blood Cell Intracellular Magnesium.
  71. Biochemistry. 5th edition. Section 26.4Important Derivatives of Cholesterol Include Bile Salts and Steroid Hormones.
  72. Hormonal regulation of cytochrome P450 enzymes, cholesterol side-chain cleavage and 17 alpha-hydroxylase/C17-20 lyase in Leydig cells.
  73. DHEA administration increases rapid eye movement sleep and EEG power in the sigma frequency range.
  74. Memory consolidation during sleep: interactive effects of sleep stages and HPA regulation.
  75. Dehydroepiandrosterone (DHEA)–a precursor steroid or an active hormone in human physiology.
  76. Impaired declarative memory consolidation during sleep in patients with primary insomnia: Influence of sleep architecture and nocturnal cortisol release.
  77. The Role of Slow Wave Sleep in Memory Processing.
  78. Slow-wave sleep and the consolidation of long-term memory.
  79. Midlife decline in declarative memory consolidation is correlated with a decline in slow wave sleep.
  80. The whats and whens of sleep-dependent memory consolidation.
  81. Oral Mg(2+) supplementation reverses age-related neuroendocrine and sleep EEG changes in humans.
  82. Sleep Selectively Enhances Memory Expected to Be of Future Relevance.
  83. Slow-Wave Sleep: Beyond Insomnia : The Importance of Slow-Wave Sleep for Your Patients.
  84. Human slow wave sleep: a review and appraisal of recent findings, with implications for sleep functions, and psychiatric illness.
  85. Restoration of brain energy metabolism as the function of sleep.
  86. Effects of different sleep duration on delta sleep in recovery nights.
  87. Enhancement of Slow Wave Sleep: Implications for Insomnia.
  88. Slow-wave sleep deficiency and enhancement: implications for insomnia and its management.
  89. The human “magnesome”: detecting magnesium binding sites on human proteins.
  90. Circadian rhythms and metabolic syndrome: from experimental genetics to human disease.
  91. The Mammalian Circadian Timing System: Organization and Coordination of Central and Peripheral Clocks.
  92. Reproducibility of the circadian rhythms of serum cortisol and melatonin in healthy subjects: A study of three different 24-h cycles over six weeks.
  93. Overview of circadian rhythms.
  94. Missing the Dark: Health Effects of Light Pollution.
  95. Circadian Rhythm Sleep Disorders.
  96. Circadian Rhythm Abnormalities.
  97. The Magnesium Factor – melatonin biosynthesis – oxidative stress, pg 172.
  98. Dietary factors and fluctuating levels of melatonin.
  99. Dietary magnesium deficiency decreases plasma melatonin in rats.
  100. Physiological and metabolic functions of melatonin.
  101. Melatonin as a chronobiotic.
  102. Melatonin, hormone of darkness and more – occurrence, control mechanisms, actions and bioactive metabolites.
  103. Melatonin receptors: role on sleep and circadian rhythm regulation.
  104. Physiology and pharmacology of melatonin in relation to biological rhythms.
  105. Anti-inflammatory actions of melatonin and its metabolites, N1-acetyl-N2-formyl-5-methoxykynuramine (AFMK) and N1-acetyl-5-methoxykynuramine (AMK), in macrophages.
  106. Melatonin and its relation to the immune system and inflammation.
  107. Melatonin expresses powerful anti-inflammatory and antioxidant activities resulting in complete improvement of acetic-acid-induced colitis in rats.
  108. Melatonin: A Multitasking Molecule.
  110. The effect of melatonin, magnesium, and zinc on primary insomnia in long-term care facility residents in Italy: a double-blind, placebo-controlled clinical trial.
  111. The effect of magnesium supplementation on primary insomnia in elderly: A double-blind placebo-controlled clinical trial.
  112. Magnesium deficiency in critical illness.
  113. Daily magnesium fluxes regulate cellular timekeeping and energy balance.
  114. Efficacy of oral magnesium administration on decreased exercise tolerance in a state of chronic sleep deprivation.
Terms of Use

Our aim is to empower people with information and natural health solutions. The information and products provided by this website and company are not intended to diagnose, treat, cure, or prevent any disease, and are not a substitute for a face-to-face consultation with your physician, and should not be construed as individual medical advice. The statements on this website have not been evaluated by the Food and Drug Administration. We do not make any representations or warranties in regard to any information offered or provided on or through this website, be it regarding treatment, action, or application of any natural treatments. Nothing said on this site is intended to encourage or promote the discontinuation of any medical treatment or prescribed medication. Any changes in your medication should only be considered under the supervision and consultation of your doctor or health care provider. Abrupt discontinuance of some medications can cause serious health complications. We take no credit for the footage and music used in the videos and graphics of this website. All credit goes to its respective media owners. Reliance on any information provided by, our affiliates, or others referenced or linked to on this Site, is solely at your own risk.

This disclaimer governs your use of this website. By using the website, you accept this disclaimer in full. If you disagree with any part of this disclaimer, do not use or read this website. If you do use or read this website, you are stating that you agree with this disclaimer. 2019   Ι   This website is designed and powered by