Are you anemic? If you are, lack of oxygen, due to blood loss or anemia can cause a headache/ migraine. You could try 'building up' your blood before your scheduled test by taking an iron supplement, eating
Red meat
Egg yolks
Dark, leafy greens (spinach, collards)
Dried fruit (prunes, raisins)
Iron-enriched cereals and grains (check the labels)
Mollusks (oysters, clams, scallops)
Turkey or chicken giblets
Beans, lentils, chick peas and soybeans
Liver
Artichokes
http://www.webmd.com/diet/features/top-10-
iron-rich-foods