This health article has been professionally reviewed by Dt Chen Zi Xin MAHPC(DTN)01583, a registered dietitian of the Malaysian Dietitians’ Association (MDA).
Insomnia is the difficulty falling asleep, staying asleep, or getting quality rest—even when the conditions for sleep are ideal. One often-overlooked factor in sleep health is magnesium deficiency, which can directly and indirectly contribute to insomnia and poor sleep quality. Magnesium plays a vital role in the central nervous system as well as in the production and regulation of key neurotransmitters.
Its deficiency can disrupt these functions, leading to:
- Direct effects: Studies have shown a strong link between low magnesium levels and poor sleep quality (1), as well as imbalances in hormones like melatonin (sleep hormone) and cortisol (stress hormone) (2).
- Indirect effects: Magnesium deficiency is also associated with conditions such as muscle cramps and restless leg syndrome (3, 4), both of which can interfere with sleep and cause daytime fatigue.
Science-Backed Ways Magnesium Improves Sleep:
1. Enhances Gamma-aminobutyric acid (GABA) Activity – Promotes Relaxation
Magnesium acts as an agonist (enhancer) of GABA (gamma-aminobutyric acid), a calming neurotransmitter that reduces brain activity and promotes relaxation (4, 5).
Imagine brain is a busy city with traffic (nerve signals), GABA as a brake pedal for your brain. Magnesium helps press that brake harder, slowing mental overactivity and reducing stress and anxiety, making it easier to fall asleep. A clinical study hasshown magnesium supplementation can improve sleep efficiency by up to 13% (2).

2. Regulates Circadian Rhythm
Magnesium supports a healthy sleep-wake cycle (2):
- Increasing melatonin production (body’s natural sleep hormone). As it gets dark in the evening, melatonin levels rise, signaling to the body that it’s time to sleep.
- Lowering cortisol (the stress hormone that can keep you awake at night).
Have you heard that eating bananas or drinking milk before bed may help you sleep better? The secret lies in their magnesium content. It is important to ensure you are getting enough magnesium for quality sleep. Without enough magnesium, internal body clock can get out of sync, making it harder to fall asleep, stay asleep, or wake up feeling rested.
3. Reduces Stress and Anxiety (6, 7)
Magnesium glycinate is a widely used form of magnesium supplement that pairs magnesium with glycine—an amino acid recognized for its calming properties (8). This combination promotes both mental relaxation and physical ease, making it particularly beneficial for individuals experiencing insomnia related to stress or anxiety.
If you are struggling with insomnia or restless nights, evaluating your magnesium intake through diet or supplements could be a simple yet effective step toward better sleep. However, please note that individual health conditions may vary, and it is advisable to seek consultation from healthcare professional before taking any magnesium supplements. Learn more about Magnesium!
Disclaimer: The information provided is for general knowledge and informational purposes only and should not be considered as medical advice or a substitute for professional consultation, diagnosis, or treatment. Always seek the advice of a qualified healthcare provider with any questions regarding a medical condition.
Reference:
- Luo, X., Tang, M., Wei, X., & Peng, Y. (2024). Association between magnesium deficiency score and sleep quality in adults: A population-based cross-sectional study. Journal of affective disorders, 358, 105–112. https://doi.org/10.1016/j.jad.2024.05.002
- Abbasi, B., Kimiagar, M., Sadeghniiat, K., Shirazi, M. M., Hedayati, M., & Rashidkhani, B. (2012). The effect of magnesium supplementation on primary insomnia in elderly: A double-blind placebocontrolled clinical trial. Journal of research in medical sciences: the official journal of Isfahan University of Medical Sciences, 17(12), 1161–1169.
- Hornyak, M., Voderholzer, U., Hohagen, F., Berger, M. & Riemann, D. (1998) Magnesium therapy for periodic leg movements-related insomnia and restless legs syndrome: An open pilot study. Sleep, 21, 501–505
- Schwalfenberg, G. K., & Genuis, S. J. (2017). The Importance of Magnesium in Clinical Healthcare. Scientifica, 2017, 4179326. https://doi.org/10.1155/2017/4179326
- Mitmesser, S. H. (2019). Micronutrient inadequacy in short sleep: Analysis of the NHANES 2005−2016. Nutrients, 11(10), 2335. https://doi.org/10.3390/nu11102335
- Derom, M. L., Sayón-Orea, C., Martínez-Ortega, J. M., & Martínez-González, M. A. (2013). Magnesium and depression: a systematic review. Nutritional neuroscience, 16(5), 191–206. https://doi.org/10.1179/1476830512Y.0000000044
- Nechifor M. (2009). Magnesium in major depression. Magnesium research, 22(3), 163S–166S 8. Tachikawa, M., & Hosoya, K. (2011). Transport characteristics of guanidino compounds at the blood-brain barrier and blood-cerebrospinal fluid barrier: Relevance to neural disorders. Fluids and Barriers of the CNS, 8, 13. https://doi.org/10.1186/2045-8118-8-13