I know that people can get headaches if they grind their teeth in the night. Maybe your pain is linked to a chewing action causing nerve pain.
WARNING...I might be talking rubbish. I expect you are going to go to your Doc..hope so. I get bad headaches..so I sympathise.
Don't want to alarm you, but persistent headaches are always a reason to just check up with your doctor. If you can narrow it down to a single specific cause, so much the better and your doctor will be very grateful for the hint, but unless you're constantly eating something to which you have a clear and known allergy, this is not normal and should be investigated further, even if it IS just grinding teeth (in which case you need to have the problem remedied by a dentist instead).