The Best Time to Take Magnesium, Based on Your Goal

The best time to take magnesium depends on why you’re taking it. For sleep, take it at bedtime. For energy, take it in the morning. For exercise, take it 30 to 60 minutes before your workout. There’s no single “best” time that applies to everyone, but a few simple rules around meals, other supplements, and your goals will help you get the most from it.

For Sleep: Take It at Bedtime

If you’re taking magnesium to sleep better, a single dose right at bedtime is the most practical approach. Mayo Clinic sleep specialists recommend 250 to 500 milligrams in one dose before bed. Forms like magnesium glycinate are popular for this purpose because they’re gentle on the stomach and less likely to cause digestive issues overnight.

There’s no evidence that taking it two or three hours before bed works better than taking it right as you turn in. Consistency matters more than precision here. Pick a time that’s easy to remember, like when you’re brushing your teeth, and stick with it.

For Energy: Take It in the Morning

Magnesium plays a role in over 300 enzyme reactions in your body, including the processes that convert food into usable energy at the cellular level. If you’re supplementing to fight fatigue or support daytime focus, morning is the logical choice. Taking it early lets it support energy production throughout the day without interfering with sleep.

Magnesium malate is often recommended for this purpose. The malic acid it contains feeds directly into your cells’ energy-production cycle, potentially offering a smoother, non-jittery energy boost compared to caffeine. People who take it in the morning often report less of an afternoon energy crash and better sustained stamina.

For Exercise: Before or After Your Workout

If you’re active, timing magnesium around your workouts can help with both performance and recovery. Taking it 30 to 60 minutes before exercise gives your body time to absorb it and make it available to your muscles, supporting muscle function and delaying fatigue during intense sessions.

Post-workout timing has its own benefits. You lose magnesium through sweat, and the first 30 to 60 minutes after exercise is when your body is most actively recovering and processing nutrients. Taking magnesium in this window helps relax muscles and replenish what you lost. If you have to choose one, before exercise is slightly more common as a recommendation, but either window works.

Always Take It With Food

Regardless of when you take magnesium, pairing it with a meal improves absorption and reduces the chance of stomach upset. One study found that magnesium absorption increased from about 46% to 52% when taken with food. That may sound modest, but the bigger benefit is avoiding the nausea, cramping, and diarrhea that magnesium on an empty stomach can cause, especially at higher doses.

This is particularly important with magnesium citrate, which has a well-known laxative effect. At supplemental doses it’s usually mild, but taking it without food makes digestive side effects more likely. If your evening routine doesn’t include a meal or snack, consider switching to a gentler form like glycinate for nighttime use.

Space It Away From Other Minerals

Magnesium competes for absorption with calcium and possibly zinc. When you take these minerals at the same time, they can block each other from being properly absorbed in your gut. The fix is simple: separate them by 2 to 4 hours. If you take calcium in the morning with breakfast, take your magnesium at dinner or bedtime.

This spacing rule also applies to certain medications. Magnesium can bind to antibiotics and bone-density drugs (bisphosphonates) in your digestive tract, making those medications less effective. If you’re on antibiotics, take them at least two hours before or four to six hours after your magnesium. For bisphosphonates, a two-hour gap in either direction is the standard recommendation.

How Much You Actually Need

The recommended daily intake for magnesium is 400 to 420 mg for adult men and 310 to 320 mg for adult women, with slightly higher needs during pregnancy. Most people get some magnesium from food (dark leafy greens, nuts, seeds, whole grains), so your supplement is filling a gap rather than covering the entire requirement.

The NIH sets the upper limit for supplemental magnesium at 350 mg per day. This ceiling only applies to supplements and medications, not magnesium from food. Staying at or below this level keeps your risk of side effects low. The most common sign you’re taking too much is loose stools or diarrhea. True magnesium toxicity is rare in people with healthy kidneys, but symptoms like persistent low blood pressure, dizziness, nausea, and muscle weakness are signals to cut back and talk to your provider.

Splitting Your Dose

If you’re taking a higher dose, splitting it into two smaller doses (morning and evening) can reduce stomach issues and may improve overall absorption. Your gut can only absorb so much magnesium at once, so smaller amounts taken twice a day are generally better tolerated than one large dose. The exception is if you’re taking magnesium specifically for sleep. In that case, keeping the full dose at bedtime makes more sense so the calming effect is concentrated when you need it.

For most people, the simplest approach is to match timing to your reason for supplementing, take it with food, and keep it separated from calcium, zinc, or any medications that interact with it. Get those basics right and the exact hour on the clock matters far less than being consistent day to day.