I have been experiencing headaches, ranging from a daily chronic headache to a mild migraine headache once a week, for a large part of my life. Some symptoms involve headaches when waking up, before meals,sleeping in, etc.
Caffeine seems to help.
Headaches can have many causes as you well know. If you have concerns about your risk of diabetes, I encourage you to discuss this with your physician. You can have your blood sugar tested to see if there are any abnormalities before or after eating. If you are curious to see if you are having low blood sugar during a headache, checking your blood sugar as a headache begins might be helpful. Another would be to discuss with your physician about borrowing a meter from their office or having someone drive you in to be tested when the headache is present.