Magnesium is a mineral that’s found naturally in many foods and in your body. However, as with most things, there are dangers associated with getting too much. Magnesium overdose is technically known as hypermagnesemia. It occurs when there is too much magnesium in your blood. It can occur in people with chronic health conditions, although it’s rare. Magnesium overdose may also result from taking too much of a supplement or medication containing magnesium.

So how does this mineral work, and what happens when you get too much of it?

Magnesium serves many functions in the human body. It’s important for:

  • protein synthesis
  • healthy bone formation
  • regulating blood pressure
  • maintaining heart health
  • energy production
  • nerve function
  • blood sugar control

According to the National Institutes of Health’s Office of Dietary Supplements, healthy adult men should generally consume 400 to 420 milligrams (mg) of magnesium daily. Healthy adult women should consume 310 to 320 mg daily. Pregnant women require a higher dose than women who aren’t pregnant.

If you take supplemental magnesium, the most you should ingest is 350 mg daily. However, magnesium may be prescribed to prevent migraine headaches, with a daily dosage of more than 350 mg a day. These dosages should only be taken with medical supervision.

Magnesium is found in a variety of foods, especially those with a lot of fiber. Nuts, leafy greens, legumes, and whole grains are among the best sources. Some specific foods that are high in magnesium include:

But food isn’t the only place you’ll find this mineral. You’ll also find it in supplements and certain medications.

For example, it’s the first ingredient in some laxatives. While these medications may have a high amount of elemental magnesium, it normally isn’t dangerous. Because of the laxative effect, you don’t absorb all of the magnesium. Instead, it’s flushed from the body before it has a chance to have much impact. Magnesium is also present in some medications for acid, indigestion, or heartburn.

Learn more: 10 foods high in magnesium »

Hypermagnesemia is rare because the kidneys work to get rid of excess magnesium. Overdose is most often seen in people with kidney failure after they take medications containing magnesium, such as laxatives or antacids.

It’s because of this risk that people with kidney disease are cautioned against taking magnesium supplements or medications that contain this mineral. The risks are also higher for people with heart disease and gastrointestinal disorders.

According to the Office of Dietary Supplements, symptoms of magnesium overdose may include:

A doctor can give intravenous (IV) calcium gluconate to help reverse the effects of excess magnesium. Dialysis may also be used to flush magnesium from the body.

Overall, the risk of ever experiencing a magnesium overdose is extremely low for a typically healthy person. Still, it is possible to have too much in certain cases. For people with impaired kidney function, discuss the risks of magnesium-containing medications and supplements with your doctor to help ensure your safety.