My son started getting migraines at 6. Headaches & throwing up.
AMAZINGLY if he eats "Crappy McCrapperson So Processed You Don't Even Have To Chew Or Digest It" breakfast cereal in the morning he doesn't get them. Our neurologist says that the number 1 cause or trigger of childhood migraines is a deficit in 2 vitamins/minerals (blanking out on them) Which uber-processed cereal is just LOADED with. So kiddo is required to make himself a bowl of cereal every morning. Has cut down on his migraines by 95%. And I can REALLY peg when he hasn't had his cereal because by 10 he starts getting glassy eyes. So I suffer through the Candy Frosted Sugar Bomb cereal, because it makes his life soooooo much better. We've tried "healthier" cereal, but really, it needs to be Kelloggs or Post. Any other brand is iffy on whether or not he'll get headaches. And the "worse" it is, the better it works. Frosted flakes beats corn flakes every time, even though he likes both. But Reeses ChocoPeanut Butter Puffs???? Ugh. Cough. Hack. Choke.
Our neurologist also says that the #2 trigger for childhood migraines is low blood sugar. Which is hilarious, because kiddo is also hypoglycemic. Poor kid. On the upside... we're so good about keeping his blood sugar where it belongs that he has very few of these. He had a TON of them in school, until I talked with the nurse, and then kiddo popped by the nurse's office once an hour for a milk box and that took care of both the hypoglycemic meltdowns as well as the blood sugar induced migraines AND it gave his little wired adhd body a chance to get up and run at least once an hour. ((His teacher started sending the other 2 non-med adhd kids in his class with him so they could get THEIR wiggles out once an hour as well)).
ANYHOW... the body of your question didn't link the headaches and throwing up, but since your Q did, and since they may very well be linked... thought I'd bring up our experience with headaches & seemingly "random" vomitting. ((Seriously, my son will NOT say he has a headache unless you ask him, and then he's like "Oh yeah, for hours." Sigh.))