When to take magnesium: morning or night, and how to time it around food and medicines
There is no proven best time of day to take magnesium. Here is how to choose morning or night, time it around food and medicines, and stay within the safe limit.

Short answer
There is no proven best time of day to take magnesium. The NIH Office of Dietary Supplements gives daily amounts, an upper limit and medicine spacing rules, but no time-of-day rule, so the best time is the one you can stick to every day and that doesn't upset your stomach (1).
Timing matters most around certain medicines. Take magnesium at least 2 hours apart from oral bisphosphonates, and take tetracycline or quinolone antibiotics at least 2 hours before or 4 to 6 hours after a magnesium supplement (1). For adults, the upper limit for magnesium from supplements is 350 mg a day, unless a doctor advises more (1).
Many people take it in the evening because they use it for sleep or night cramps, and some take it in the morning to make it a habit or to spread out side effects. Both are reasonable. If you've been switching your magnesium between breakfast and bedtime and feel you're overthinking it, you're not imagining the confusion: the labels and the advice online really do contradict each other, and that's not your fault.
Note: this article is for general education and is not medical advice. Talk to a doctor or pharmacist before starting magnesium if you have kidney disease, take prescription medicines (especially antibiotics, osteoporosis drugs, diuretics or acid reflux medicines), or are pregnant. Severe diarrhea, muscle weakness, a very slow or irregular heartbeat, or confusion after taking magnesium need urgent medical help. This guide is published by Welltory, which makes one of the apps mentioned.


Start understanding your body
Learn what affects your energy, stress, sleep, and daily state. Get the app.
What decides the right time for you
Because studies haven't shown one time of day to be better for absorption, the useful question isn't "morning or night?" but "what am I taking it for, and what else am I taking?" Four things decide your timing:
Your reason for taking it. If you take magnesium to help you wind down or for night-time leg cramps, people usually take it in the evening. If you take it because your diet is low in magnesium, any consistent time works.
Your other medicines. Some antibiotics and osteoporosis drugs bind to magnesium in the gut. Their spacing rules are the only timing rules with official backing (1).
Your stomach. Higher doses often cause diarrhea, nausea and cramping (1). A time when a loose stool is less disruptive, or splitting the dose, can make it easier to continue.
Your routine. A supplement works only if you actually take it. Tie it to something you already do every day: breakfast, brushing your teeth, or your evening wind-down.
If you're still deciding whether you need magnesium at all, start with our guide should I take magnesium?, which covers who is more likely to be low and what the evidence shows.


Discounts for blog readers: up to 36% off
See what affects your energy, stress, sleep, and daily state with Welltory
Morning or night: how the two options compare
| | Morning | Evening or before bed |
|---|---|---|
| Good fit if | You want an easy daily habit; you take it for general intake | You take it to wind down or for night cramps |
| Possible downside | Loose stools during the day | Loose stools at night can disturb sleep |
| Medicine spacing | Easy to separate from evening medicines | Easy to separate from morning medicines |
| Evidence that the time itself matters | None found | None found |
Based on the NIH Office of Dietary Supplements fact sheet (1). Checked November 2026.
Can I take magnesium in the morning?
Yes. Nothing in the official guidance says magnesium must be taken at night (1). Morning works well if breakfast is the one meal you never skip, or if you take other supplements then. It also means any laxative effect happens while you're awake rather than at 3 a.m.
The one thing to check is your morning medicines. If you take an oral bisphosphonate, such as alendronate, in the morning on an empty stomach, keep magnesium at least 2 hours away from it (1).
Should I take magnesium at night?
Evening is popular because many people take magnesium hoping it will help them sleep. The evidence for that is limited. In one small double-blind trial, 46 older adults with insomnia took 500 mg of magnesium or a placebo daily for 8 weeks. The magnesium group improved on an insomnia severity score, sleep efficiency and time to fall asleep (3). The dose was above the usual supplement upper limit, used under study conditions, and the group was small and specific, so it doesn't prove that an evening dose helps everyone.
Our article do supplements like magnesium glycinate for sleep work? goes through the sleep studies in more detail.
How long before bed should I take magnesium?
No study has compared, for example, one hour before bed with three hours before bed. A practical approach: take it at a fixed point in your evening routine, such as with dinner or when you start winding down, rather than as you turn off the light. Taking it with dinner also gives you a meal in your stomach, which some people find gentler.
If an evening dose gives you loose stools that wake you up, move it earlier or to the morning. A supplement that interrupts your sleep isn't helping your sleep.
When to take magnesium glycinate
Magnesium glycinate (also sold as bisglycinate) is magnesium bound to the amino acid glycine. It's one of the most searched forms, and people often ask whether it has its own best time.
The short answer is the same as for other forms: there's no evidence that glycinate works better at a particular time of day. Most people who take it for relaxation or sleep take it in the evening, and most people who take it for general intake take it whenever is easiest.
What differs between forms is how well they dissolve and how they sit with your gut:
| Form | What the NIH fact sheet says | Common practical note |
|---|---|---|
| Citrate, lactate, chloride, aspartate | Tend to be better absorbed than oxide and sulfate | Citrate can loosen stools |
| Oxide, sulfate | Lower bioavailability | Often used as laxatives or antacids |
| Glycinate (bisglycinate) | Not separately rated in the fact sheet | Often chosen by people who want a gentler option |
Based on 1. Checked November 2026.
Whatever form you choose, the amount that counts toward the upper limit is the elemental magnesium listed on the Supplement Facts label, not the total weight of the compound. A capsule labeled "magnesium glycinate 1,000 mg" may contain much less elemental magnesium. Read the "Amount per serving" line.
Should magnesium be taken with food?
The NIH fact sheet does not say whether magnesium should be taken with or without food (1). In practice:
Follow the label. Manufacturers sometimes give directions based on their specific product.
If it upsets your stomach, taking it with a meal is a common way to make it easier to tolerate. Ask your pharmacist if you're unsure.
Food isn't on the interaction list. The fact sheet's timing warnings are about specific medicines, not meals (1).
Food magnesium doesn't count toward the upper limit. The 350 mg limit applies only to supplements and medicines, not to magnesium in food and drinks (1).
How much magnesium do you need, and how much is too much?
Timing questions often hide a dose question: "If I take it twice a day, is that too much?" Here are the official numbers for adults.
| Age | Men | Women | Pregnancy | Breastfeeding |
|---|---|---|---|---|
| 19–30 years | 400 mg | 310 mg | 350 mg | 310 mg |
| 31–50 years | 420 mg | 320 mg | 360 mg | 320 mg |
| 51+ years | 420 mg | 320 mg | — | — |
These are total daily intakes from food, drinks and supplements combined (Recommended Dietary Allowances) (1).
Upper limit from supplements: 350 mg a day for adults, including during pregnancy and breastfeeding (1). This limit covers supplements and magnesium-containing medicines such as some laxatives and antacids. Doctors sometimes recommend more for specific conditions; that's a decision to make with them, not from a label.
Splitting a dose. If you take two capsules a day, add them up. Splitting doesn't change the total; it may just make them easier on your stomach. Remember to count magnesium in a multivitamin, an electrolyte drink or an antacid you take on the same day.
Timing magnesium around medicines
This is where timing truly matters. Magnesium can bind to some drugs in the gut and stop them from being absorbed, and some drugs change how much magnesium your body keeps.
Osteoporosis medicines (oral bisphosphonates, such as alendronate). Keep magnesium supplements and magnesium-rich antacids or laxatives at least 2 hours before or after the bisphosphonate (1).
Tetracycline and quinolone antibiotics (for example, doxycycline or ciprofloxacin). Take the antibiotic at least 2 hours before or 4 to 6 hours after magnesium (1). During a short course, many people find it simpler to pause the supplement; ask your pharmacist.
Diuretics. Loop and thiazide diuretics can increase the magnesium you lose in urine, while potassium-sparing diuretics reduce it (1). This is about your overall level, not the hour you take it, so it's a conversation for your doctor.
Acid reflux medicines (proton pump inhibitors, PPIs). Taken for a long time, typically more than a year, they can lower blood magnesium (1). If you've been on one for a long time, ask whether your magnesium has been checked.
A simple way to set this up: write your medicines on a list with the times you take them, then put magnesium in the largest gap. Show the list to your pharmacist once; it takes them a minute to spot a clash.
Other supplements matter too. Our guide to vitamins not to take together covers common combinations, and coffee and vitamins explains how your morning coffee fits in.
How to set up a magnesium routine in five steps
Pick your reason. Write one line: "I'm taking magnesium for ___." It decides your timing and how you'll judge whether it's worth continuing.
Check the label for elemental magnesium. Add any other sources (multivitamin, antacids, laxatives) so the supplement total stays within 350 mg a day, unless your doctor has advised otherwise (1).
Check your medicine list. Apply the spacing rules above, or ask your pharmacist.
Anchor it to a habit. Morning with breakfast or evening with dinner are the easiest anchors.
Keep it the same for two to four weeks before deciding whether it helps. Changing the time, dose and form at once makes it impossible to tell what made a difference.
Common timing mistakes
Taking it with your antibiotic. This is the most important clash to avoid (1).
Doubling up because you forgot. If you missed a dose, take the next one as usual. Two at once raises the chance of diarrhea.
Counting the compound weight instead of elemental magnesium, and accidentally going over the limit, or under.
Switching time, form and dose all at once, and then not knowing what helped.
Ignoring loose stools. Diarrhea is the most common side effect of higher doses (1) and also means you're losing some of what you took. Lower the dose or split it.
Taking extra magnesium with kidney disease without talking to a doctor. The risk of magnesium building up is higher when kidneys don't work well (1).
Who should check before taking magnesium at any time
People with kidney disease or reduced kidney function (1).
People taking antibiotics, bisphosphonates, diuretics or long-term PPIs (1).
People who are pregnant or breastfeeding, so their doctor knows the full supplement list.
Anyone with an irregular heartbeat or a heart condition, so their doctor can take the supplement into account.
People who already take laxatives or antacids containing magnesium.
How to tell whether your magnesium timing is working
Most people want magnesium to change something they can feel: easier sleep, fewer cramps, calmer evenings. These changes are subtle, and they're easily mixed up with everything else going on. A simple log makes it clearer:
Write down the time and dose each day.
Rate the thing you care about: how easily you fell asleep, whether you had cramps, how rested you felt, on a 1–10 scale.
Note side effects, especially stomach symptoms.
Note big confounders: alcohol, late caffeine, a hard workout, stress at work.
After two to four weeks, compare. If evening magnesium leaves you with no change and a disturbed stomach, try the morning instead, or ask whether you need it at all. For sleep specifically, our article on melatonin timing vs dose shows a similar way to test one change at a time.
Living with a magnesium routine: the questions people ask next
Is it bad to take magnesium every day?
For healthy adults, NIH sets the upper limit for supplements at 350 mg a day; higher doses often cause diarrhea, nausea and cramping (1). People with kidney disease need medical advice before daily use.
Can I take magnesium with my coffee?
There's no official warning against it. Coffee affects some other nutrients, which we cover in coffee and vitamins. If you take magnesium for sleep, the bigger issue is late-afternoon coffee, not the magnesium itself.
Should I take magnesium before or after a workout?
No official guidance links magnesium timing to exercise. Take it at the time you'd remember. If you get cramps after training, our guide to leg cramps at night and magnesium explains what the evidence says.
Can I take magnesium if I take it for anxiety or headaches?
People do, often in the evening, but timing advice for these uses comes from routine rather than studies. See magnesium for anxiety and magnesium for migraines for what's known.
How long does it take for magnesium to work?
It depends on why you're taking it. In the sleep trial above, changes were measured after 8 weeks (3). Give any routine at least a few weeks before judging it.
Before you blame yourself
If you've been taking magnesium for weeks and don't feel different, it's easy to decide you're doing it wrong, picked the wrong form or missed the "right" hour. Before you blame yourself, look at your own data. The feeling ("magnesium isn't working") often has a cause you can see: short sleep on nights with late screens, alcohol on weekends, or a stomach upset that means less magnesium is being absorbed. Pick one lever, such as taking it at the same time every day for two weeks with nothing else changed, and look again.
When to see a doctor
Get urgent help for severe diarrhea that won't stop, muscle weakness, a very slow or irregular heartbeat, low blood pressure symptoms such as fainting, or confusion after taking magnesium. Very high magnesium can cause these, and the risk is higher with kidney problems (1).
See a doctor if you're taking magnesium for symptoms that persist, such as ongoing insomnia, frequent cramps, palpitations or headaches. These have many causes, and a supplement can hide a problem that needs a different treatment.
Ask about testing if you take long-term PPIs or diuretics, or have a condition affecting your gut, since these can lower magnesium (1).
How to bring this up with your doctor
What to ask for, by name. "Could you check my magnesium level, and do any of my medicines interact with a magnesium supplement?"
What to bring. The supplement bottle (or a photo of the Supplement Facts label), a list of all medicines with the times you take them, and a short log of what you're hoping magnesium will change.
What to say, out loud. "I take ___ mg of elemental magnesium as ___ at ___ o'clock. I take it for ___. I'm also on ___."
If you're told it doesn't matter. Ask: "Is there any timing I should change because of my antibiotic, osteoporosis drug or diuretic?" Pharmacists are also a good source for this specific question.
How Welltory helps — and what it cannot do
The limits first. Welltory is a general wellness product, not a medical device. It does not diagnose magnesium deficiency, measure magnesium levels or recommend doses. It can't tell you whether a supplement is working on its own; it can help you see patterns in your own data while you try a change.
Tag what you change. On iOS with Apple Watch or Oura connected, when Welltory detects a stress or recovery episode and asks "What happened?", you can tap a suggested tag, type, or answer by voice, for example "magnesium at 9 pm" or "magnesium with breakfast" (My Patterns).
See your sleep alongside the change. If you connect an Apple Watch or Oura on iOS, or a compatible device through Health Connect on Android, Welltory can show your sleep data, so you can compare nights before and after you change your timing (Sleep Analysis, Sleep Analysis on Android).
A morning reading without a watch. You can take a spot HRV and heart rate measurement with your phone camera, at the same time each morning, to see how your body is recovering over the weeks you're testing a routine (camera measurements, accurate HRV measurements). Read more in how to measure HRV without a wearable.
A record for your doctor. From the web app you can export your data as CSV and bring it to an appointment (export guide).
How we made it
We based this article on the NIH Office of Dietary Supplements magnesium fact sheet for health professionals and a double-blind placebo-controlled trial of magnesium for insomnia in older adults. Search questions came from what people in the United States most often ask about when to take magnesium. For the product section, we checked every function against the Welltory Help Center on November 11, 2026.
Made with AI tools, then edited and fact-checked by the Welltory team. See our Editorial & AI policy.
Jane Smorodnikova, co-founder of Welltory, built the methodology behind how we read physiological data.
Written by Tatsiana Yashyna.
This article is for educational purposes only and is not medical advice. Severe diarrhea, muscle weakness, a very slow or irregular heartbeat, or confusion after taking magnesium need urgent medical help. Talk to a doctor before taking magnesium if you have kidney disease or take antibiotics, osteoporosis drugs, diuretics or acid reflux medicines. This guide is published by Welltory, which makes one of the apps mentioned. Welltory is a general wellness product: it helps you track and understand your data and does not diagnose or treat any condition. Sources were retrieved on November 11, 2026.
Was this helpful?
Ask AI for a summary of page
Written by Jane Smorodnikova
Written by Tatsiana Yashyna
References
- NIH Office of Dietary Supplements — Magnesium: Fact Sheet for Health Professionals. https://ods.od.nih.gov/factsheets/Magnesium-HealthProfessional/
- Welltory Help Center — My Patterns (iOS). https://help.welltory.com/en/articles/16012012-my-patterns-ios
- Abbasi B, Kimiagar M, Sadeghniiat K, 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. PMID 23853635. https://pubmed.ncbi.nlm.nih.gov/23853635/
- Welltory Help Center — Sleep Analysis. https://help.welltory.com/en/articles/9888090-sleep-analysis
- Welltory Help Center — Sleep Analysis (Android). https://help.welltory.com/en/articles/12164985-sleep-analysis-android
- Welltory Help Center — Taking measurements with your smartphone camera. https://help.welltory.com/en/articles/4412277-taking-measurements-with-your-smartphone-camera
- Welltory Help Center — How to take accurate heart rate variability measurements. https://help.welltory.com/en/articles/3361520-how-to-take-accurate-heart-rate-variability-measurements
- Welltory Help Center — How to export data from Welltory. https://help.welltory.com/en/articles/3368391-how-to-export-data-from-welltory

