Updated 23rd April 2024

Can magnesium help with constipation?

Share this article

  • Share on Facebook
  • Share on Twitter
  • Print this page
  • Email this page

Magnesium can help relieve constipation, and it’s available over the counter. You might see it as “magnesium citrate” in laxative medications.

It’s a mineral that supports the chemical reactions that control your blood sugar, blood pressure, and how your nerves and muscles work. Magnesium also plays other roles in your body.

If you’re finding it hard to poop or don’t often feel the urge, you might have constipation. And while magnesium can help, there are other approaches to consider.

Laxative medications shouldn’t be your first choice, Dr. Will Bulsiewicz, a board-certified gastroenterologist and U.S. medical director of ZOE, explained on a recent ZOE Science & Nutrition podcast episode.

“It's common for people to head straight to the pharmacy to pick up whatever medication is available to treat their constipation. And sadly, in many cases in our healthcare systems, the doctors will recommend these things,” he said. “But I personally think that we need to start with diet and lifestyle.”

How magnesium works

When magnesium reaches your intestines, it helps draw in water. Your dry poop absorbs the water, which makes the poop easier to pass. This type of laxative is called an osmotic.

There are different types of magnesium, and not all work as laxatives. Here are the ones that help you poop:

  • magnesium sulfate

  • magnesium citrate

  • magnesium hydroxide (milk of magnesia)

How long does it take to work?

Magnesium citrate usually takes 30 minutes to 6 hours to stimulate a bowel movement. It’s the same with magnesium sulfate and hydroxide.

If you don’t notice a bowel movement in this time frame — and you’ve tried other ways to make pooping easier — speak with a doctor.

If laxatives aren’t doing anything, it could point to an underlying issue that needs investigating.

Other ways to make pooping easier

As Dr. B mentioned, making changes to your diet and routines can help provide some regularity to your poops.

Here are some strategies to try before you take constipation medication or supplements:

Drinking plenty of water

Dehydration is a common cause of constipation. Try starting with 6–8 cups of water a day, and see if that helps.

Eating more whole plant foods

Adding high-fiber plant foods, like apples, chia seeds, green vegetables, kiwis, and legumes, can move your poop along. 

“By increasing our whole plant food intake, we’re actually increasing our fiber intake,” Dr. B said.

“And when we reduce our ultra-processed food intake in combination with this, we ultimately are guiding ourselves toward a poop that’s more microbiome-friendly.”

Snacking on prunes

Having certain dried fruits, like prunes, is a great way to up your fiber intake.

Prunes also provide sorbitol, a sugar alcohol with laxative effects. In one small study, a daily serving of 100 grams of prunes provided chronic constipation relief.

Getting active

Some research suggests that regular exercise might help you achieve regular bowel movements. And an inactive lifestyle may have the opposite effect, meaning you poop less often. 

The reason for this isn’t clear yet, but exercise might make your stomach muscles work harder or release gut hormones that promote pooping.

Join our mailing list

Sign up for fresh insights into our scientific discoveries and the latest nutrition updates. No spam, just science.

Eating probiotics

Probiotics are live bacteria that can benefit your health. They naturally exist in some fermented foods, like some yogurts and sauerkrauts. Manufacturers can also add them to foods or sell them as supplements. 

Unpublished ZOE research suggests that people who eat probiotics poop more often.

In our study — the largest nutrition science study in the world — we saw that participants who ate more probiotics had more bowel movements than those who didn’t eat any.

The odds of pooping most days went up by around 10% when participants consumed one type of probiotic. This increase was around 15% if they ate fermented dairy, other fermented foods, and took probiotic supplements.

Drinking coffee

Responses to coffee vary from person to person

For some, it might make pooping easier. A review of research indicates that coffee can encourage the movement of food through the gut, in some cases. 

While there’s no guarantee that coffee will have this effect on you, it may be a low-risk option. 

Scientists aren’t sure why coffee gets the bowels moving for some people. It may stimulate gut muscles, but overall, we need more research.

To hear more about what Dr. B has to say about constipation, you can listen to the ZOE Science & Nutrition podcast episode here.


If changing your diet and routine don’t have the desired effect, you might consider an over-the-counter magnesium laxative.

The ideal dosage depends on a person’s age and the type of magnesium involved: magnesium citrate, magnesium sulfate, or magnesium hydroxide.

AgeMagnesium citrateMagnesium sulfateMagnesium hydroxide
12+ yearsTry half to a whole 10-fluid-ounce bottle.Try 2–6 teaspoons.Try 2–4 tablespoons.
6–12 yearsTry a third to half a bottle.Try 1–2 tsp.Try 1–2 tbsp.
2–6 years of ageSpeak with a doctor first.Speak with a doctor first.Try 1–3 tsp.

You can take each of these as a single dose or divide them throughout the day. Drink a full glass of liquid with each dose.

Side effects and risks

Consuming a lot of magnesium from a laxative can lead to these side effects:

  • diarrhea

  • nausea and vomiting

  • stomach cramping

There’s far more magnesium in laxatives than in foods that contain the mineral. One tbsp of magnesium hydroxide provides 500 milligrams of magnesium.

If you consume very high doses of magnesium — more than 5,000 mg a day — there’s also a risk of magnesium poisoning.

The symptoms include:

  • low blood pressure

  • nausea and vomiting

  • facial flushing

  • tiredness

  • low mood

  • muscle weakness

  • a fast or irregular heartbeat

  • breathlessness

Who shouldn’t take magnesium for constipation?

Magnesium products are available without a prescription. But speak with a doctor if you’re:

  • pregnant or trying for pregnancy

  • breastfeeding

  • still constipated after using a different laxative for 1 week

  • currently taking other medication

  • aware that your bowel habits have been different for more than 2 weeks

  • having stomach pain, nausea, or vomiting

  • a person with kidney disease or diabetes

  • on a low-magnesium or low-salt diet

Food sources of magnesium

A balanced, nutritious diet will contain all the magnesium you need.

One study from the United States looked at dietary magnesium intake and chronic constipation.

After analyzing participants’ daily number of poops, the researchers found that consuming more magnesium was associated with less constipation.

It’s best to get the mineral through foods rather than supplements. Good sources of magnesium include:

FoodServing sizeMagnesium per serving (mg)% of the daily value
Roasted pumpkin seeds1 ounce15637
Chia seeds1 oz11126
Dry roasted almonds1 oz8019
Boiled spinach½ cup7819
Dry-roasted cashews1 oz7418
Oil-roasted peanuts¼ cup6315
Soy milk1 cup6115
Cooked black beans½ cup6014
Shelled, cooked edamame beans½ cup5012
Smooth peanut butter2 tbsp4912
Cooked brown rice½ cup4210

The recommended daily allowances of magnesium are as follows:

  • males aged 14–18: 410 mg

  • males aged 19–30: 400 mg

  • males aged 31 and above: 420 mg

  • females aged 14–18: 360 mg

  • females ages 19–30: 310 mg

  • females ages 31 and above: 320 mg

If you’re pregnant, the recommended allowances are higher.

It’s worth noting that many of these foods have other benefits related to constipation. For example, chia seeds provide soluble fiber, which dissolves in water to form a gel that softens your poop

Almonds, on the other hand, are an excellent source of insoluble fiber. This makes your poops heavier and easier to pass through your gut.

At ZOE, we know that each of us responds to foods differently. Our research shows that eating the best foods for you can keep your gut healthy and provide plenty of other health benefits.

To learn more about how our personalized nutrition program works, you can take our free quiz.


Laxatives that contain magnesium may help relieve constipation. But it’s better to see if adjusting your food choices, drinking more water, and being more physically active will do the trick before you try a medication.

You can get magnesium from your diet in certain whole plant foods, like pumpkin and chia seeds, almonds, and boiled spinach.

Magnesium citrate, hydroxide, and sulfate are medications that could help unleash your bowel movements within 6 hours.

But they can cause side effects, and certain people should speak with a doctor before trying them.


Share this article

  • Share on Facebook
  • Share on Twitter
  • Print this page
  • Email this page