When to Take Magnesium: Morning, Night, With or Without Food

Doz · October 28, 2026

Facts checked against NIH Office of Dietary Supplements and MedlinePlus sources on October 28, 2026.

For most people there is no single best time of day to take magnesium. The NIH Office of Dietary Supplements (ODS) does not name one in either of its magnesium fact sheets. What matters more is taking it at a time you will keep to, and keeping it away from the few medicines it interferes with. If the label on your product or your pharmacist gives a time, follow that.

This guide covers food, morning or night, spacing from other medicines and the kidney question. It does not say which form to buy or how much to take. Those depend on why you are taking it and what else you take, which is a conversation for your doctor or pharmacist. For the forms themselves, see magnesium types explained.

The short answers

Question Short answer Where it comes from
Is there a best time of day? Not for most people. Pick one you will keep. Neither ODS fact sheet names a time
With or without food? ODS doesn't say. MedlinePlus says to take magnesium gluconate with meals. Your product's label decides. MedlinePlus
Morning or night? Either. Plan around the medicines it has to stay away from. ODS, MedlinePlus
How far from antibiotics? Tetracyclines and quinolones: at least 2 hours before, or 4 to 6 hours after, magnesium ODS
How far from osteoporosis tablets? Oral bisphosphonates: at least 2 hours before or after ODS
Kidney disease? Ask your doctor before you start ODS, MedlinePlus

Once you have a time, the hard part is keeping it, especially when magnesium has to sit a few hours away from something else. Doz is a free download on the App Store: you add magnesium next to your prescriptions, each with its own reminder at its own time, so a two-hour gap from a morning antibiotic is set once rather than worked out every day. It counts the bottle down and warns you in the app when it is running low. It does not tell you what the gap should be; that comes from the table above or your pharmacist.

With food or without

Neither ODS fact sheet says whether to take magnesium with food. What they do say is that high doses of magnesium from supplements or medicines often cause diarrhoea, which can come with nausea and stomach cramps. The forms most often reported to cause diarrhoea are magnesium carbonate, chloride, gluconate and oxide.

MedlinePlus is more direct for one form: to prevent side effects, magnesium gluconate should be taken with meals. So if magnesium upsets your stomach, taking it with a meal is a reasonable first thing to ask your pharmacist about. If the label on your product says something else, follow the label.

Mealtimes also make a good anchor. "With dinner" is easier to remember than "at 7pm", and it moves with you on the days dinner does.

Morning or night

ODS does not recommend a time of day, and its health professional fact sheet does not cover sleep, so it gives no support to the idea that a night dose helps you sleep or that a morning dose works better. Choose the time that fits the rest of your day:

If your label says to take it more than once a day, the times-a-day schedule tool spreads the doses across your waking hours.

Keep it apart from these medicines

ODS lists two groups of medicine that magnesium interferes with directly, and gives the gap for each. Taken too close together, magnesium cuts how much of the drug your body absorbs.

Medicine Examples ODS gives Gap from magnesium
Tetracycline antibiotics demeclocycline, doxycycline Antibiotic at least 2 hours before, or 4 to 6 hours after, the magnesium
Quinolone antibiotics ciprofloxacin, levofloxacin Antibiotic at least 2 hours before, or 4 to 6 hours after, the magnesium
Oral bisphosphonates (for osteoporosis) alendronate Magnesium at least 2 hours before or after

The rule covers more than supplements. Some antacids and laxatives contain magnesium too, and ODS applies the bisphosphonate gap to "magnesium-rich supplements or medications". MedlinePlus goes further for one product: take magnesium oxide and any other medicine at least 2 hours apart.

ODS also names two groups that change your magnesium level rather than how well a drug is absorbed. Some diuretics make you lose more magnesium in urine, and others make you keep more. Proton pump inhibitors taken for a long time, typically more than a year, can lower it. There is no timing fix for these. If you take one regularly, ODS advises talking to your doctor about how much magnesium you get.

Our guide to supplements and prescription medicines covers why the pharmacist needs to know about every supplement you take, not only this one.

If you have kidney disease

Your kidneys get rid of extra magnesium. ODS says the risk of magnesium toxicity rises when kidney function is impaired, because the body loses some or all of its ability to remove it. MedlinePlus asks you to tell your doctor about kidney disease before taking magnesium. If you have kidney problems, do not start a magnesium supplement without asking your doctor first.

Setting a magnesium reminder in Doz

Once you know the time:

  1. Add magnesium as its own medication, next to your prescriptions.
  2. Set its reminder for a fixed clock time, or tie it to a meal such as dinner.
  3. If it has to stay away from an antibiotic, put the two at times that keep the gap, for example antibiotic with breakfast and magnesium with dinner.
  4. Enter how many tablets are in the bottle, so you get a low-stock warning in the app before it runs out.

Doz will remind you at the times you set. It does not check for interactions and it does not work out the gap for you, so set the times from the table above or from what your pharmacist told you.

Frequently Asked Questions

What is the best time of day to take magnesium?

For most people there isn't one. The NIH Office of Dietary Supplements does not recommend a time of day. Take it at a time you will keep to, and if you also take a tetracycline or quinolone antibiotic or an oral bisphosphonate, choose a time that keeps the gap ODS gives.

Should I take magnesium with food?

ODS does not say. High doses of magnesium supplements often cause diarrhoea, nausea and stomach cramps, and MedlinePlus says magnesium gluconate should be taken with meals to prevent side effects. If your product's label says something different, follow the label.

Is it better to take magnesium at night?

ODS does not say that it is. Its fact sheets do not recommend a time of day, and the health professional fact sheet does not cover sleep. Night is a good choice if it keeps magnesium away from a morning antibiotic or osteoporosis tablet, or if it is simply the time you will remember.

How long should I wait between magnesium and an antibiotic?

For tetracyclines such as doxycycline and quinolones such as ciprofloxacin, ODS says to take the antibiotic at least 2 hours before or 4 to 6 hours after a magnesium-containing supplement. For other antibiotics, ask your pharmacist.

Can I take magnesium if I have kidney disease?

Ask your doctor first. ODS says the risk of magnesium toxicity increases when kidney function is impaired, because the kidneys cannot remove the excess as well.

Sources

Download Doz on the App Store · Read the FAQ · More from the blog