How magnesium affects sleep

As part of our Biohacking Masterclass Series, we will explore a number of different techniques and practices to improve your daily performance. This series will range from obvious subjects like exercise and nutrition to fringe subjects like breathing techniques and sleep hygiene. Consult your physician before implementing any of these topics. We are not your physician. Note: This post may contain affiliate links to the products we use. 

At least 3 out of every 5 Americans are estimated to consume less than the daily recommended amount of magnesium (Mg2+). To naturally reach that general recommendation (420 mg for men, 320 mg for women), one must consume adequate amounts of fruits and vegetables. However, because plants pull magnesium from the soil, soil-mineral depletion has dramatically reduced the availability of essential minerals like magnesium. Before any processing, fruits and vegetables are estimated to have 20-30% less magnesium than the same fruit or vegetable from 60 years ago. [1-4]

The stripped down mineral profile in these fruits and veggies is further complicated by refining and processing. As much as 90% of magnesium is lost to modern processing techniques. 

Magnesium plays a role in over 600 enzymatic reactions, of which many include vital steps in DNA repair (cancer prevention), protein synthesis, glycolysis (for the production of cellular energy and blood sugar regulation), vitamin D activation, and ATPase activity (which converts basic cellular energy into activity like heart beats, skeletal muscle contractions, and more). Increasingly, however, magnesium has been recognized for its role in promoting healthy and high-quality sleep. [3,4]

There are a few ways magnesium can lead to better sleep, but the most studied pathways include:

First, magnesium acts as an agonist of a specific type of receptor in the central nervous system (CNS) called a GABA receptor. Magnesium helps to facilitate the transmission of GABA signaling, which includes the downstream effect of inhibiting activity in the CNS. In other words, magnesium assists in making the brain less active and promotes sleepiness. [1,2]

Second, magnesium acts as an antagonist to NMDA receptors. NMDA receptors are found in excitatory neurons and are responsible for an ‘activating’ response in the brain. As an antagonist to this receptor type, magnesium inhibits the excitation of the nervous system. This blocking effect leads to sleep promotion. [1,2]

In lab settings magnesium supplementation has been shown to improve both subjective and objective measures of sleep quality. One such study showed magnesium supplementation led to increased sleep time, increased sleep efficiency, and decreased sleep onset latency (the time to fall asleep). Patients who took magnesium also reported (subjective) feelings of improved sleep over placebo. 

In animal studies, depletion of magnesium changed circadian rhythms, increased wakefulness, and decreased stages 3 & 4 of NREM sleep (aka deep sleep, where >70% of hGH is produced).

What are some of the best natural sources of magnesium? 

Leafy greens like spinach, kale, and swiss chard are packed with magnesium. Nuts (i.e. brazil, almonds, cashews), seeds (i.e. flax, chia, and pumpkin), avocados, dark chocolate, black beans, and certain fatty fishes like salmon or mackerel are other good options. 

If you have trouble finding or eating quality whole foods like those above, supplementation with magnesium can get you to your recommended daily intake. Magnesium citrate is one of the most biologically available forms after passing through the digestive system (this is also the form we used in our Stack). Magnesium citrate will have better rates of absorption than alternatives like magnesium oxide. 


  1. Abbasi B, Kimiagar M, Sadeghniiat K, Shirazi MM, Hedayati M, Rashidkhani B. The effect of magnesium supplementation on primary insomnia in elderly: A double-blind placebo-controlled clinical trial. J Res Med Sci. 2012;17(12):1161-1169.
  2. Depoortere H. et al. Effects of a Magnesium Deficient Diet on Sleep Organization in Rats. Neuropsychobiology. 1993;27:237-245.
  3. Uwitonze et al. Role of Magnesium in Vitamin D Activation and Function. J Osteopath Med; 118(3): 181-189.
  4. de Baaij JH, Hoenderop JG, Bindels RJ. Magnesium in man: implications for health and disease. Physiol Rev. 2015 Jan;95(1):1-46. doi: 10.1152/physrev.00012.2014. PMID: 25540137.