If you’ve bought a magnesium supplement for sleep, the label probably told you how much to take. It almost certainly didn’t tell you when. Search online and you’ll find confident answers ranging from “first thing in the morning” to “exactly 30 minutes before bed.”
The truth is less exciting. No study has compared morning and evening magnesium head to head for sleep. What we do know is enough to make a sensible plan, and that’s what this guide gives you.
Key takeaways
- No study proves a best time. Taking magnesium every day matters more than the hour.
- Evening, 30 to 60 minutes before bed, suits most people. Take it with dinner if it upsets your stomach.
- Stay within 350 mg from supplements and keep it two hours away from certain antibiotics and bone medicines.
In this article
Does magnesium help sleep in the first place?
A little, for some people. Magnesium is involved in calming nerve activity, and low intake has been linked with poorer sleep. The trials of supplements are small. In one often-quoted 2012 study, 46 older adults with insomnia took 500 mg of magnesium or a placebo for eight weeks, and the magnesium group slept somewhat better. A 2021 review that pooled the available trials in older adults found people fell asleep roughly 17 minutes faster, but rated the evidence as low quality.
So magnesium is not a sleeping pill. It’s most likely to help if your diet is low in it, which is common. The NIH Office of Dietary Supplements notes that many adults get less than the recommended amount from food. If you want to check your own intake first, read our guide to the signs of magnesium deficiency.
So when should you take it?
Magnesium doesn’t knock you out an hour later the way a sedative does. Its effect comes from keeping your levels topped up over days and weeks. That means taking it every day matters more than the exact hour.
That said, evening makes the most sense for most people, for three plain reasons:
- It becomes part of your wind-down. A fixed bedtime routine helps sleep on its own, and a supplement you take at the same point every night is easy to remember.
- Any relaxing effect lands at the right time. Some people do feel calmer after taking it.
- You sleep through the mild side effects. If it makes you slightly drowsy, that’s fine at 10 p.m. and annoying at 10 a.m.
A reasonable target is 30 to 60 minutes before bed. Close enough to be part of your routine, early enough that the glass of water doesn’t send you to the bathroom at 2 a.m.

When morning or mealtime is better
Evening isn’t right for everyone. Switch if any of these apply:
- It upsets your stomach. Take it with dinner instead of on an empty stomach. Food slows absorption a little, but it makes magnesium much easier to tolerate.
- You take medicines at night. Magnesium can block the absorption of some antibiotics (tetracyclines and quinolones such as ciprofloxacin) and osteoporosis medicines (bisphosphonates). These need to be taken at least two hours apart, sometimes more. Your pharmacist can give you the exact gap for your prescription.
- You forget at night. A dose you take with breakfast every day beats a bedtime dose you remember twice a week.
- You’re taking a large dose. Splitting it between morning and evening is gentler on the gut.
Does the type of magnesium change the timing?
Not the timing, but it changes how your stomach reacts.
| Form | What to know |
|---|---|
| Glycinate | Gentle on the stomach, the usual pick for sleep. See our guide to magnesium glycinate for sleep. |
| Citrate | Well absorbed, but has a mild laxative effect. Not ideal right before bed for some people. |
| Oxide | Cheap and common, less well absorbed, most likely to cause loose stools. |
The NIH notes that forms that dissolve well in liquid, such as citrate, are absorbed more completely than magnesium oxide.
How much is safe?
The upper limit for magnesium from supplements is 350 mg a day for adults. That figure doesn’t include the magnesium in food, which your kidneys handle without trouble. Going higher mostly gets you diarrhea, cramps and nausea.
Check the label for “elemental magnesium.” A capsule that says “magnesium glycinate 1,000 mg” may contain only around 100 to 140 mg of actual magnesium, and that smaller number is the one that counts.
Who should talk to a doctor first
- People with kidney disease. Damaged kidneys can’t clear extra magnesium, and it can build up to dangerous levels.
- Anyone taking the medicines mentioned above, or diuretics, or long-term acid reflux tablets.
- Women who are pregnant or breastfeeding.
- Anyone thinking of giving magnesium to a child.
Give it two to four weeks
Take it at the same time daily for a few weeks before you judge it. Keep a simple note of how long you took to fall asleep and how often you woke. If nothing has changed after a month, magnesium probably isn’t your missing piece.
It also won’t override habits that work against sleep. Late caffeine, a bright phone in bed and an irregular wake-up time will beat any supplement. Our guide on how to sleep better at night naturally covers those. And if your problem is waking in the early hours, read why you keep waking up at 3am.
The short answer
There is no scientifically proven best time. Take magnesium daily, at a time you’ll remember. For most people that’s 30 to 60 minutes before bed, or with dinner if it bothers your stomach. Stay within 350 mg from supplements, keep it away from interacting medicines, and give it a few weeks.
Common questions
Can I take magnesium in the morning for sleep?
Yes. Because it works by keeping your levels steady, a morning dose still counts. Evening is simply more convenient for most people.
Is it OK to take magnesium every night?
For most healthy adults, yes, within the 350 mg supplemental limit. People with kidney problems should not take it without medical advice.
Can I take magnesium with melatonin?
They’re often combined in sleep products and there’s no known harmful interaction for most people. Melatonin has its own cautions, so read what the NCCIH says and check with a pharmacist if you take other medicines.
Sources
- Magnesium: Fact Sheet for Health Professionals, NIH Office of Dietary Supplements.
- Magnesium: Fact Sheet for Consumers, NIH Office of Dietary Supplements.
- Abbasi B, et al. The effect of magnesium supplementation on primary insomnia in elderly: a double-blind placebo-controlled clinical trial. Journal of Research in Medical Sciences. 2012;17(12):1161-1169.
- Mah J, Pitre T. Oral magnesium supplementation for insomnia in older adults: a systematic review and meta-analysis. BMC Complementary Medicine and Therapies. 2021;21:125.
- Sleep Hygiene, Sleep Foundation.
