Dosage. Supplementation with vitamin B2 and magnesium should be medically supervised. University of Maryland indicates a daily dose of 400 mg of riboflavin and between 200 to 600 mg of magnesium for managing migraine headaches.osage. Supplementation with vitamin B2 and magnesium should be medically supervised. University of Maryland indicates a daily dose of 400 mg of riboflavin and between 200 to 600 mg of magnesium for managing migraine headaches.