Magnesium for Sleep: What You Need to Know
If you’ve ever had trouble falling or staying asleep, you know how hard it can be to function the next day. A recent survey by the American Academy of Sleep Medicine (AASM) found that more than 3 out of 4 adults in the United States report they don’t always get the sleep they need.
Recently, supplements that include magnesium have become very popular as a remedy for sleeplessness.
How does magnesium affect sleep?
Magnesium is a natural mineral that’s essential for your body’s health. It helps your nerves and muscles work normally. This mineral also plays a role in keeping bones healthy, controlling blood sugar and blood pressure, and producing energy.
Scientists are studying whether magnesium may also affect sleep. Research shows that it influences chemicals in the brain related to alertness. Some studies suggest that taking magnesium supplements may help some people sleep better, especially if they have low magnesium levels. But the results have been mixed.
Why sleep is important
Sleep is critical for overall health and well-being. Having good sleep habits is often called “sleep hygiene.” While it may seem like downtime, sleep is an active phase the body uses to restore and recharge itself. Insomnia happens when good sleep doesn't come easily. Insomnia is a common sleep disorder that makes it hard to fall asleep, stay asleep, or get enough restful sleep.
To get more sleep, “start by focusing on the fundamentals,” said Richard T. Lee, MD, an integrative oncology specialist at City of Hope cancer center and an American Society of Clinical Oncology (ASCO) expert. This can mean sticking to a regular bedtime and watching what and when you eat and drink. Dr. Lee also suggested mind-body practices, noting that clinical trials have shown improvements in sleep quality with relaxation techniques like yoga and meditation.
For long-lasting (chronic) insomnia, the AASM recommends cognitive behavioral therapy for insomnia (CBT-I). CBT-I is a short-term mental health therapy program intended to help people rebuild a healthy sleep routine. If you’ve tried strategies like yoga and therapy and are still struggling with sleep, “then it’s reasonable to consider a dietary supplement like magnesium,” said Dr. Lee. The AASM suggests combining CBT-I with sleep medicines, rather than relying on sleep medicines alone.
Magnesium vs. melatonin
Magnesium and melatonin are both popular supplements used as sleep aids, but they are quite different. Each works in its own way to help promote rest and sleep.
Melatonin is a natural hormone the body produces when it starts to get dark. It helps signal that it’s nighttime, which can encourage sleepiness. Some studies suggest that melatonin supplements may have a similar effect. However, “they should be used temporarily and then weaned off,” said Dr. Lee. If taken for an extended time, melatonin may stop working. And taking too much can cause vivid dreams or morning grogginess.
What types of magnesium help sleep?
Interest in magnesium supplements to help with sleep has grown in recent years. However, research is limited and studies have found mixed results about whether magnesium actually makes a difference. Even so, these supplements are widely available in several forms. Each of them is absorbed differently and has different effects on the body.
- Magnesium glycinate (or bisglycinate) is a common choice to help with sleep. The body absorbs it easily, and it’s gentle on the stomach.
- Magnesium citrate is another common form. It draws water into the intestines, which can be useful for managing constipation but can also cause diarrhea.
- Magnesium L-threonate was developed to help increase magnesium levels in the brain. Studies focused on brain function and thinking. One small trial suggests it improves sleep quality, but larger studies are needed.
- Magnesium taurate may affect the cardiovascular system. Its effects on blood pressure and related health problems are being studied, but research in people is limited.
- Magnesium oxide is not absorbed very easily and is often used as a laxative or to relieve constipation.
Whichever form you choose, look for a product that has been tested for quality. Check the bottle or box for ingredients and testing information. “Make sure to get a product that has third-party testing,” said Dr. Lee. The United States Pharmacopeia (USP), NSF, and ConsumerLab.com (CL) evaluate whether a supplement is pure and of high quality. But keep in mind their testing doesn’t show if the supplement will help improve sleep.
How much magnesium should you take to help with sleep?
You should always check with a healthcare provider before taking any supplements. If you and your doctor decide magnesium is safe, follow the directions on the box or bottle.
Magnesium can interact with certain medicines and keep them from working the way they should. Examples include some antibiotics, the seizure medicine gabapentin, and bone-strengthening medicines known as bisphosphonates. If you have other health problems or take other medicines, your doctor can help you decide what sleep aid is best.
Can you take magnesium if you have cancer?
People with cancer should always consult their care team before starting any new supplement. Certain cancer treatments can change how your body handles minerals, such as magnesium.
Some cancer medicines, such as cisplatin and other similar chemotherapy drugs, can cause magnesium levels to drop. A lower-than-normal level is called hypomagnesemia. In these situations, your magnesium level will be monitored with a blood test. A magnesium supplement may be considered.
Having too much magnesium, or hypermagnesemia, is rare. But some people with cancer can have it, especially if their kidney function is impaired. “It’s worthwhile to have your magnesium level checked. If it’s high, taking more would be problematic,” said Dr. Lee.
Your care team can also explore what’s causing your insomnia. Whether it’s related to your treatment or not is important to know. For example, your doctor can often adjust the timing of medications you currently take, such as steroids that interfere with sleep. If that works well, you may not need a magnesium supplement. Your care team can also provide a schedule for taking magnesium if medicines that interfere with it are part of your treatment plan.
People being treated for cancer should be particularly careful about the digestive issues associated with magnesium. When combined with cancer-related side effects, they can lead to serious dehydration.
Questions to ask your healthcare provider
If you’re having trouble sleeping, reach out to your doctor to ask a few questions:
- Are you testing my magnesium levels?
- Is it safe for me to take a magnesium supplement?
- Would magnesium interact with any of my current medicines?
- Which form of magnesium do you recommend for my sleep issues?
Learn more from the American Cancer Society:
- Sleep Problems in People With Cancer
- Are Dietary Supplements Safe?
- Practice Mindfulness, Meditation, and Relaxation
Dr. Lee is an ASCO member.
- Written by
Written by the American Society of Clinical Oncology (ASCO) with medical and editorial review by the American Cancer Society content team.


