Go Ad-Free
logoThe People's Perspective on Medicine

How to Use Magnesium to Get to Sleep

People who have trouble sleeping may want to use magnesium supplements to help. Making sure vitamin D levels are adequate also helps.

Americans aren’t getting enough sleep. Shift work, late night television and various health problems such as sleep apnea or restless legs syndrome can all contribute to inadequate rest. Sleep deprivation, in turn, can lead to health consequences such as obesity, depression, diabetes, hypertension, cancer or age-related macular degeneration (Touitou et al, Life Sciences, online Feb. 15, 2017). But sleeping pills carry many risks of their own. Can you use magnesium to get the sleep you need? Should you also be taking vitamin D?

Magnesium Supplement Helps with Sleep Problems:

Q. After reading one of your columns about sleep problems, I just had to write to tell you of my new-found cure. Originally, my husband found this supplement for me on the Internet as a help for leg cramps. They were waking me up and then I would find it hard to fall back asleep.

I started taking it, and it cured my leg cramps. Moreover, it also helped me fall back to sleep faster, especially if I have to visit the bathroom in the middle of the night.

This supplement has been a godsend to me. In addition to magnesium, it contains ashwagandha, Rhodiola and melatonin. Although melatonin usually makes me feel like I want to jump out of my skin, this has so little in it, I don’t feel that effect. With one pill a night, I get a great night’s sleep.

A. Thank you for sharing your experience. A recent review of dietary supplements to improve sleep found that there is evidence for the benefit of low-dose melatonin, but more research is needed on magnesium (Postgraduate Medical Journal, Jan. 13, 2021).  Ashwagandha root can also improve sleep quality (Journal of Ethnopharmacology, Jan. 10, 2021).

Although many readers find magnesium helpful against leg cramps, a systematic review of research concluded that it is unlikely magnesium helps prevent nighttime cramps (Cochrane Database of Systematic Reviews, Sep. 21, 2020). People with impaired kidney function must avoid extra magnesium, as excess magnesium can put a strain on the kidneys.

You can learn more about non-drug approaches for better sleep, including Ashwagandha, in our eGuide to Getting a Good Night’s Sleep.

When Should You Use Magnesium?

Q. I listened to you talking on the podcast about the trouble with OTC sleeping pills. Why does no one mention magnesium as a sleep aid? I know it works because I can’t keep my eyes open when I take it, whether morning or night.

A. Some people are super sensitive to the sedative effects of magnesium.

For example, on August 20, 2001, we published this letter:

“Years ago I was visiting my sister who urged my husband and me to start taking magnesium with our vitamins. We took the first dose the morning we left for home.

“We usually split the driving. I drive in the evening, when I am most alert, and my husband drives in the daytime while I drowse. But that trip neither of us could keep our eyes open. We nearly pulled over into a rest stop to sleep, but we managed to get to our destination.

“I mentioned this to my sister, and she said, ‘Sleepiness is a side effect. We take magnesium at night.’ I’ve used it for insomnia ever since.”

Changes in the concentration of potassium, magnesium, calcium and hydrogen ions between brain cells are linked to sleep and wakefulness cycles (Ding et al, Science, Apr. 29, 2016). A magnesium supplement of 400 mg/day probably won’t change the amount of magnesium within cells (Wienecke and Nolden, MMW Fortschritte der Medizin, Dec. 2016). But it can reduce stress as measured by heart rate variability. According to the authors, this could help manage “restlessness, irritability, lack of concentration, sleep disorder or depression.”

How Much Magnesium Should You Take?

As we suggested above, some people are especially sensitive to the calming or sedative effects of this mineral. Others are particularly sensitive to its laxative effects. It won’t help your sleep if you need to leap out of bed in the middle of the night and race to the bathroom. A dose of 400 mg/day of magnesium will do that for some people. That is why it is important to find the right dose for you if you want to use magnesium.

What Is the Story on Vitamin D?

Vitamin D and magnesium seem to work together in the body, at least in some instances. Might vitamin D also help overcome sleep problems?

Adults with sleep apnea are often deficient in vitamin D. A study published in JAMA Otolaryngology-Head and Neck Surgery has now found that vitamin D deficiency may also be common in children who have breathing difficulties at night (JAMA Otolaryngology-Head and Neck Surgery, Oct. 31, 2024).

The study included 72 youngsters undergoing tonsillectomy to address their sleep apnea. More than one third of these kids were deficient in vitamin D, with lower levels associated with greater breathing troubles. We don’t know if vitamin D supplementation can reverse this problem. It certainly seems like a topic for an in-depth conversation with the pediatrician.

Readers Weigh In:

Here is one reader’s question from 2013:

Q. What can you tell me about using magnesium as a sleep aid? I think I read about it in your newspaper column but could not find the information again. Do you have a guide you can send me?

A. Magnesium has been used to help control nighttime leg cramps that wake people up (Allen and Kirby, American Family Physician, Aug. 15, 2012). One small study in an Italian nursing home found that magnesium supplements together with melatonin and zinc at bedtime improved sleep quality (Rondanelli et al, Journal of the American Geriatrics Society, Jan. 2011). The supplement contained 5 mg melatonin, 225 mg magnesium, and 11.25 mg zinc, mixed with 100 g of pear pulp. It was given one hour before bedtime.

To learn more about magnesium and other non-drug approaches to overcoming insomnia, you will find our eGuide to Getting a Good Night’s Sleep helpful.

Another reader reported this experience:

“I have suffered from episodes of insomnia for years and have tried many remedies without relief. A friend suggested magnesium (250 mg) at bedtime. Magnesium has helped my insomnia more than anything else I’ve ever tried. There are still occasional nights when I don’t sleep well, but they are few and far between.”

Rate this article
star-fullstar-emptystar-fullstar-emptystar-fullstar-emptystar-fullstar-emptystar-fullstar-emptystar-fullstar-emptystar-fullstar-emptystar-fullstar-emptystar-fullstar-emptystar-fullstar-empty
4.2- 207 ratings
About the Author
Terry Graedon, PhD, is a medical anthropologist and co-host of The People’s Pharmacy radio show, co-author of The People’s Pharmacy syndicated newspaper columns and numerous books, and co-founder of The People’s Pharmacy website. Terry taught in the Duke University School of Nursing and was an adjunct assistant professor in the Department of Anthropology. She is a Fellow of the Society of Applied Anthropology. Terry is one of the country's leading authorities on the science behind folk remedies..
Tired of the ads on our website?

Now you can browse our website completely ad-free for just $5 / month. Stay up to date on breaking health news and support our work without the distraction of advertisements.

Browse our website ad-free
Citations
  • Touitou Y et al, "Association between light at night, melatonin secretion, sleep deprivation, and the internal clock: Health impacts and mechanisms of circadian disruption." Life Sciences, March 15, 2017. DOI: 10.1016/j.lfs.2017.02.008
  • Chan V & Lo K, "Efficacy of dietary supplements on improving sleep quality: a systematic review and meta-analysis." Postgraduate Medical Journal, Jan. 13, 2021. DOI: 10.1136/postgradmedj-2020-139319
  • Langade D et al, "Clinical evaluation of the pharmacological impact of ashwagandha root extract on sleep in healthy volunteers and insomnia patients: A double-blind, randomized, parallel-group, placebo-controlled study." Journal of Ethnopharmacology, Jan. 10, 2021. DOI: 10.1016/j.jep.2020.113276
  • Garrison SR et al, " Magnesium for skeletal muscle cramps." Cochrane Database of Systematic Reviews, Sep. 21, 2020. DOI: 10.1002/14651858.CD009402.pub3
  • Ding F et al, "Changes in the composition of brain interstitial ions control the sleep-wake cycle." Science, Apr. 29, 2016. DOI: 10.1126/science.aad4821
  • Wienecke E & Nolden C, "[Long-term HRV analysis shows stress reduction by magnesium intake]." MMW Fortschritte der Medizin, Dec. 2016. DOI: 10.1007/s15006-016-9054-7
  • Bluher AE et al, "Vitamin D deficiency and pediatric obstructive sleep apnea severity." JAMA Otolaryngology-Head and Neck Surgery, Oct. 31, 2024. doi:10.1001/jamaoto.2024.3737
  • Allen RE & Kirby KA, "Nocturnal leg cramps." American Family Physician, Aug. 15, 2012.
  • Rondanelli M et al, "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." Journal of the American Geriatrics Society, Jan. 2011. https://doi.org/10.1111/j.1532-5415.2010.03232.x
Join over 150,000 Subscribers at The People's Pharmacy

We're empowering you to make wise decisions about your own health, by providing you with essential health information about both medical and alternative treatment options.