Symptoms of low magnesium include fatigue, loss of appetite, nausea, and more. Low magnesium is also linked to headaches. For this reason, magnesium oxide is sometimes used to treat and prevent migraine.

Magnesium is an essential mineral that our bodies need to function properly. It can improve bone health, stabilize blood pressure, and help maintain a healthy heart rhythm and nerve function.

However, it’s estimated that many people don’t get enough magnesium through their diets. Read on to learn if happens when your body does not get enough magnesium.

There are multiple types of magnesium, which are sometimes used to treat different conditions. The body doesn’t easily absorb magnesium without being bound to another substance. Because of this, supplements often have magnesium combined with other substances, like amino acids.

The most common types of magnesium used in supplements include:

  • magnesium oxide, which can contain high levels of magnesium and is often used to treat migraines
  • magnesium sulfate, which is an inorganic form of magnesium, and only small amounts of the supplement can be absorbed into the body
  • magnesium carbonate, which has slightly higher levels of magnesium and is more likely to cause gastrointestinal upset
  • magnesium chloride, which is easily absorbed into the body
  • magnesium citrate, of which large amounts can be absorbed into the body; it’s often used to induce bowel movements

Significant research has shown that people with migraines often have lower levels of magnesium than those without them.

A 2021 study found magnesium oxide to be as effective as valproate sodium at preventing migraine attacks without adverse side effects. Some older research has also shown that taking daily magnesium supplements can be effective at preventing menstrual-related migraines.

Magnesium oxide is frequently used to prevent migraines. You can take it in pill form, with a general recommended dosage of about 400 to 500 milligrams a day. Magnesium can be administered intravenously in the form of magnesium sulfate.

Because magnesium is a natural element and is necessary for our health, it may be a safe migraine treatment. This is especially true when compared to migraine medications, which can come with more severe side effects.

Magnesium is generally considered safe to take for most people, but taking it can result in some side effects. The most common side effects are abdominal cramping, vomiting, and diarrhea. If you experience these, you can try lowering your dosage for relief.

Another common side effect of magnesium is low blood pressure. If you already have low blood pressure, talk with your doctor before taking magnesium regularly.

Taking too much magnesium can lead to a dangerous buildup and can result in serious side effects, like:

  • irregular heartbeat
  • unsafe low blood pressure
  • slowed breathing
  • coma

For this reason, talk with your doctor before you start taking magnesium to ask about the best dosage for you.

For those who don’t want to take supplements, some foods naturally contain magnesium.

Dark leafy greens like spinach and chard are some of the best foods you can eat. One cup of either contains between 38 to 40 percent of the recommended daily value of magnesium.

Other foods that contain magnesium include:

  • seeds, like pumpkin or squash seeds
  • almonds
  • mackerel, tuna, and Pollock fish
  • low-fat yogurt or kefir
  • black beans and lentils
  • avocado
  • figs
  • bananas
  • dark chocolate

While supplements can provide a powerful boost, it’s best to focus on getting magnesium through your diet by incorporating magnesium-dense foods.

If you have digestive conditions like inflammatory bowel disease or a stomach infection, ask your doctor before taking magnesium. These conditions can affect how much magnesium the body absorbs.

Magnesium can also interact with other medications, including:

  • antibiotics
  • diuretics or water pills
  • muscle relaxants
  • heart medications

If you’re pregnant, consult your doctor before you take magnesium. For pregnant women, it’s generally considered safe to take 350 to 400 milligrams of magnesium oxide in pill form each day. It’s not safe to take magnesium sulfate intravenously, as that’s associated with bone thinning in the fetus.

When taken in safe doses, magnesium can effectively prevent migraines for many people. Since magnesium generally has fewer side effects than prescription migraine medication, it may be a more suitable option.

If you’re experiencing migraines for the first time, or they’ve increased in severity or frequency, seek help from your doctor. They can help you determine how much magnesium you should take and what other treatment options to consider.