Several studies have shown that people who experience migraine headaches are more likely to be magnesium deficient. Supplementing with magnesium can help to reduce the frequency of migraines.

One study showed that people who took a magnesium supplement reduced the frequency of migraines by 41.6%, compared to 15.8% in people who took a placebo. A therapeutic dose of magnesium is between 200 and 600 milligrams daily.

Magnesium is found in green leafy vegetables, nuts, seeds and muscle meat. If you are in excellent health, you may be able to meet your magnesium needs by including these foods in your diet. However, if you are trying to reduce the incidence of headaches, you will probably need a magnesium supplement, either in powder or tablet form.

Many different factors can deplete your body of magnesium, thus raising your requirement. Some of these include stress, anxiety, alcohol, sugar and diuretics (water pills).

Reference