I have the same thing and found using a powdered Magnesium will help me get through the migraine and also helps with the constipation. Actually being constipated is a precursor to the migraine. I did notice that the scalp muscles are contracting and that is the cause of the headache and afterwards my scalp will be very tender. I've noticed that fasting will cause me to get the headaches as will the smallest bit of overexertion (minimal sweating?). I've considered electrolyte depletion but also hypoglycemia as well.
I have thyroid nodules (hyperthryoid) also which I can't cure because I can't fast.