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