The best time to take magnesium depends on why you’re taking it. For sleep, take it 30 to 60 minutes before bed. For energy, stress management, or general health, morning or afternoon with a meal works well. There’s no single “correct” time, but matching your timing to your goal makes a real difference in how well the supplement works for you.
For Sleep: Take It Before Bed
If better sleep is your main reason for supplementing, take magnesium one to two hours before bedtime. Magnesium appears to influence several brain chemicals involved in relaxation, including GABA (which calms neural activity), melatonin (which regulates your sleep-wake cycle), and cortisol (your stress hormone). The net effect is that your body winds down more easily.
Magnesium glycinate is the form most commonly recommended for sleep. The glycine it contains has its own calming properties, which may help you fall asleep faster and stay asleep longer. It’s also one of the gentlest forms on your stomach, so taking it with a light evening snack is usually enough to avoid any digestive issues.
For Energy and Stress: Take It in the Morning
Morning supplementation makes more sense if you’re using magnesium to support energy levels, ease daytime anxiety, or reduce muscle tension. Magnesium plays a central role in converting food into usable energy, so taking it earlier in the day aligns with when your body needs that support most.
Magnesium malate is often marketed for energy because it’s paired with malic acid, a compound directly involved in your cells’ energy production cycle. Magnesium citrate is another option for daytime use. If you’re taking magnesium glycinate for anxiety or muscle tension rather than sleep, a morning or afternoon dose still provides calming effects without making you drowsy.
For Exercise: Two Hours Before Your Workout
Some evidence suggests that taking magnesium about two hours before intense exercise may improve performance and reduce post-workout soreness. The likely mechanism is that magnesium helps regulate how your body uses glucose during exercise, which can delay the buildup of lactic acid in your muscles. That means less fatigue during the workout and potentially less soreness afterward.
Whether taking magnesium after a workout offers the same recovery benefits is less clear. If you exercise in the morning, this timing conveniently overlaps with a morning dose alongside breakfast.
Always Take It With Food
Regardless of when you take magnesium, pair it with a meal. One study found that magnesium absorption increased from about 46% to 52% when taken with food, likely because food slows the supplement’s transit through your digestive tract, giving your body more time to absorb it.
Taking magnesium on an empty stomach raises your risk of diarrhea, nausea, and stomach cramping. This is especially true for certain forms: magnesium oxide, magnesium carbonate, magnesium chloride, and magnesium gluconate are the most common culprits for digestive side effects. Even gentler forms like magnesium glycinate can cause stomach trouble at higher doses if taken without food.
Spacing Magnesium From Other Supplements
Calcium and magnesium compete for absorption when taken together at high doses. A simple fix: take calcium with one meal and magnesium with a different meal, separated by at least two hours. The same applies to zinc, which also competes with magnesium for the same absorption pathways.
A practical schedule might look like calcium with breakfast and magnesium with dinner, or vice versa. This way both minerals get absorbed efficiently without interfering with each other.
Medications That Need a Time Buffer
Several common medications don’t absorb properly when taken alongside magnesium. If you take any of the following, you’ll need to plan your timing carefully:
- Antibiotics (fluoroquinolones and tetracyclines): Take these at least two hours before or four to six hours after magnesium.
- Bisphosphonates (used for osteoporosis): Separate from magnesium by at least two hours.
- Gabapentin (used for nerve pain and seizures): Separate from magnesium by two hours.
Magnesium can bind to these drugs in your digestive tract, reducing how much of the medication actually makes it into your bloodstream. If you take any of these, an evening magnesium dose is often the easiest way to create enough separation from morning medications.
How Much You Actually Need
The recommended daily intake for magnesium varies by age and sex. Adult men need 400 to 420 mg per day, while adult women need 310 to 320 mg. During pregnancy, that increases to 350 to 360 mg. Most people get some magnesium from food (dark leafy greens, nuts, seeds, whole grains), so your supplement dose should fill the gap rather than cover the entire recommendation.
If you’re taking a higher dose, splitting it between two meals can reduce the chance of digestive side effects. For example, half with breakfast and half with dinner. This also keeps magnesium levels steadier throughout the day rather than delivering one large spike.
Picking a Time That Sticks
Consistency matters more than perfection. Magnesium’s benefits build over days and weeks of regular use, so the “best” time is ultimately the time you’ll remember to take it. If you already have a morning routine with breakfast, that’s a natural anchor. If you’re more consistent with an evening meal, pair it with dinner or a bedtime snack.
For people juggling multiple goals, evening tends to be the most versatile window. You get the sleep benefits, you can pair it with dinner to improve absorption, and you naturally create distance from morning medications or calcium supplements. But if sleep isn’t a concern and energy is your priority, there’s no reason to wait until evening.