Start with the most simple, apart from anxiety.
Could you be allergic to your shampoo or conditioner? Try a different one and see if it helps. I don't know if you've changed shampoos in 7 years - most people have, but we seem to stay in the same scent family, or same brand, or same family of solutions, like more volume, for dry hair, etc. Try something totally different, maybe for a sensitive scalp.
Pay attention to what you're eating when you notice the symptoms. If some foods give people a headache, maybe certain foods are making this worse for you. If you notice this is getting worse, write down everything you've eaten and drank in the last 24 hours. See if there's a pattern.
Change your pillow. Pillows get old and maybe there are dust mites in yours that are causing an allergy. Get allergy covers for them, too.
Do each thing one at a time, because if something helps, you won't know which one it is.
Maybe none of it will help. If it doesn't though, you've at least ruled them out which is half the battle.
Maybe it is anxiety, but until you've ruled everything else out, you can't really know.
Let us know how it goes. :)