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 ...