Young woman sleeping in soft bed at night

Does magnesium help you sleep? A sleep doctor answers common questions

Young woman sleeping in soft bed at night

Magnesium supplements are one of the most talked about sleep aids today. From social media posts to targeted advertising, it's easy to wonder whether magnesium can really help you sleep better.

We asked a UC Davis Health sleep medicine doctor to answer the most common questions about magnesium. Learn who may benefit, how much to take and what current medical research shows.Magnesium for 

Magnesium for sleep: Quick answers

  • Magnesium may help some people sleep better, especially those with low magnesium levels.
  • Magnesium glycinate is often recommended for sleep because it is gentle on your stomach.
  • Take magnesium 30 minutes to two hours before bedtime.
  • It may take several weeks to notice results.
  • Magnesium and melatonin work differently and are used for different sleep concerns.

Does magnesium help you sleep?

Yes, magnesium supplements may help some people sleep better, especially if they don't get enough magnesium naturally. Symptoms of low magnesium levels include difficulty sleeping, migraine headaches, muscle cramps, tingling in hands or feet and a fast heartbeat.

Experts note that it is difficult to say who will benefit from magnesium supplements. Most studies provide either insufficient or limited evidence that it improves sleep.

Learn about our sleep medicine program

See recommended health screenings by age

What type of magnesium is best for sleep?

Magnesium comes in several forms. Each is absorbed differently by your body and may support different health goals.

  • Magnesium glycinate supports sleep, stress and anxiety. It is gentle for your stomach and can help calm your nervous system.
  • Magnesium L-threonate may be a good choice if your mind is racing or you can’t shut down at night. It can be more expensive than other magnesium options.
  • Magnesium citrate can be good if you have constipation, but too much can lead to diarrhea.

Magnesium can interact with certain medicines so check with your doctor before taking supplements.

Learn why you should partner with a primary care doctor

When will magnesium start helping me sleep?

It can take many weeks of consistent use of magnesium supplements to notice improvement in sleep, especially in those deficient in magnesium. Magnesium is not fast acting like a sleeping pill or meant for a single night like melatonin.

Sign up for our Health Highlights e-newsletter

When should you take magnesium?

Take magnesium anywhere from 30 minutes to two hours before you plan to sleep. This allows your body time to absorb the supplement.

Is magnesium safe for daily use?

Yes, a magnesium supplement is generally considered safe for most healthy adults if it’s used as directed. People with kidney disease, nerve or muscle disorders, or heart rhythm problems should be careful when taking magnesium supplements. Talk with your doctor before taking magnesium because it can affect how other medicines work.

Check out our primary care clinics across the Sacramento region

How much magnesium should you take for sleep?

Healthy adults should limit their daily magnesium supplement to 300 – 420 mg per day. Higher daily doses of magnesium can cause side effects including diarrhea and nausea.

What are the best food sources of magnesium?

Magnesium is a mineral that’s found in plant and animal food sources. Be sure to choose a variety of healthy forms to achieve your goal.

Natural sources of magnesium include:

Learn how registered dietitians can support your health

What is the difference between magnesium and melatonin?

Melatonin is a hormone produced by the brain to regulate your sleep-wake cycle and internal clock. It’s usually used in lower doses to help improve sleep problems such as jet lag, shift work disorder and other sleep disorders.

Magnesium is a mineral your body needs to help your brain, muscles and nerves work properly. It can help ease stress and muscle cramps and may promote better sleep.

Read about melatonin safety, side effects and how it works

Can you take magnesium and melatonin together to help with sleep?

Yes, you can take magnesium and melatonin together to help with sleep. They target different parts of the sleep process. Magnesium can help with muscle and nerve relaxation. Melatonin lets your internal clock know it’s time for sleep. 

Check with your doctor to discuss using magnesium and melatonin supplements together and possible interactions they may have with any medications you take.

Is magnesium safe for children to help them sleep?

Magnesium supplements are not generally recommended as safe for children unless specifically advised by your pediatrician. These supplements are not regulated by the FDA. Doses that are too high may cause upset stomach or diarrhea.

Natural sources of magnesium in food include leafy greens, beans, whole grains, and avocados.

This blog was medically reviewed by UC Davis Health sleep medicine director Krishna M. Sundar

Recommendations are based on guidance from the National Institutes of Health National Center for Biotechnology Information, NIH Office of Dietary Supplements, American Cancer Society. and other national medical organizations.

Subscribe to Cultivating Health

Subscribe to our blog and receive notifications of new stories by email.

refreshLoad new characters