What Time to Take Magnesium: Morning or Night?

The best time to take magnesium depends on why you’re taking it. For sleep, take it at bedtime. For exercise recovery, take it after your workout. For general supplementation, take it with any meal that fits your routine. The one rule that applies to everyone: take magnesium with food to boost absorption and avoid stomach trouble.

Why Taking It With Food Matters

Magnesium absorbs better when your digestive system is already processing a meal. One study found that magnesium absorption increased from about 46% to 52% when taken with food rather than on an empty stomach. That difference adds up over weeks and months of daily supplementation. The likely reason is that food slows everything down in your gut, giving your intestines more time to pull magnesium into your bloodstream.

Taking magnesium without food also raises the odds of diarrhea, nausea, and abdominal cramping, especially at higher doses. If you’ve ever taken a magnesium supplement and felt your stomach churn, an empty stomach was probably the culprit.

One thing to watch: high-fiber foods, nuts, leafy greens, beans, and whole grains contain compounds called phytates and oxalates that can bind to magnesium and reduce how much you absorb. If your meal is heavy in these foods, try to space your magnesium dose about two hours away from that meal. For most other meals, taking your supplement alongside your plate is the simplest approach.

For Better Sleep: Take It at Bedtime

If you’re using magnesium to help with sleep, taking it right before bed is the most practical timing. A dose of 250 to 500 milligrams in a single nighttime dose is the range typically suggested for sleep support. Magnesium glycinate and magnesium threonate are the forms most commonly chosen for this purpose because they’re less likely to cause digestive side effects than other forms.

Pair your bedtime dose with a small snack if you haven’t eaten recently. A handful of crackers or a spoonful of yogurt is enough to buffer your stomach and improve absorption without disrupting your sleep.

For Exercise: Before or After Your Workout

The timing here depends on your goal. If you want to support performance during your session, taking magnesium roughly 30 minutes before exercise is the approach tested in animal studies. While the evidence in humans is still limited, this timing aligns with how quickly magnesium begins to absorb.

If muscle soreness is your bigger concern, taking magnesium after your workout may be more useful. In one study, athletes who supplemented with 350 milligrams of magnesium daily for ten days reported significantly less muscle soreness than those taking a placebo. Post-workout is also a natural time to eat, which makes it easy to take your supplement with food.

For Nighttime Leg Cramps

If you’re dealing with leg cramps that wake you up at night, bedtime dosing makes the most sense. A clinical trial of 175 people found that taking magnesium at bedtime for 60 days reduced the number of nocturnal leg cramp episodes compared to a placebo. Since the cramps happen during sleep, having magnesium levels at their highest during those hours gives you the best shot at relief.

For Constipation Relief

Magnesium citrate, the form most commonly used as a laxative, typically produces a bowel movement within 30 minutes to 6 hours. If you’re taking it for this purpose, morning is usually the most convenient time so you’re not dealing with the effects overnight. Take it with a full glass of water.

Splitting Your Dose Through the Day

If you’re taking a higher dose, splitting it into two or three smaller doses spread across the day is better than taking it all at once. Your body can only absorb so much magnesium at a time, and a single large dose is more likely to cause diarrhea. Taking 150 milligrams with breakfast and another 150 milligrams with dinner, for example, gives your gut two chances to absorb the mineral efficiently.

The tolerable upper intake level for supplemental magnesium in adults is 350 milligrams per day, according to the National Institutes of Health. This limit applies only to supplements and medications, not to magnesium you get from food. Staying at or below this threshold reduces the risk of side effects, though some people take higher amounts under medical supervision.

Spacing Magnesium Away From Medications

Magnesium can interfere with how your body absorbs several common medications, so timing matters if you take any of the following:

  • Antibiotics: Take your antibiotic either two hours before or four to six hours after magnesium.
  • Thyroid medication: Separate magnesium and thyroid hormones by several hours. Most people take thyroid medication first thing in the morning on an empty stomach, so an evening magnesium dose works well.
  • Bisphosphonates (for bone density): Space magnesium at least two hours before or after. Some bisphosphonates require a 30- to 60-minute gap before any supplement.
  • Gabapentin: Take gabapentin at least two hours after any magnesium supplement.

If you take any of these medications, the easiest strategy is to take magnesium at the opposite end of the day. Morning medications pair naturally with an evening magnesium dose, and vice versa.

Consistency Matters More Than Perfection

Magnesium’s benefits build over time. It takes days to weeks of consistent supplementation to raise your body’s levels meaningfully. Whether you settle on morning, evening, or split dosing, the most important thing is picking a time you’ll actually remember. Tying it to a meal you eat every day, whether that’s breakfast or dinner, turns it into a habit rather than something you have to think about. The “perfect” time is the one that keeps you consistent.