One of the symptoms of sleep apnea is a morning headache. It is an effect of several things happing during the night. Sleep apnea causes multiple arousals during the night which keeps you from getting a restful sleep as well as going into the deeper slow wave sleep which where your body heals itself. Each time someone with sleep apnea stops breathing it causes an increase in pressure in the chest that can effect the entire body and lead to high blood pressure. Your oxygen levels also fall depriving your body and brain of oxygen. This can definitely lead to that morning headache.
Sleep deprivation can also lead to that foggy feeling when you get up in the morning. This could be due to routinely getting poor sleep. If you change your bedtime frequently your body can become confused and cause disrupted sleep or insomnia. Your pets can be another disturbance. Pets tend to move around during the night and they wake you during the night. But the worst culprit of a restful sleep is light and sleep; this can come from the TV, computer or outside. You can not sleep restfully with light and sound disturbing you. Lack of continuous sleep on a regular basis will bring on difficulty with short term memory, concentration and morning headaches.
One of the best ways to look at what you might be doing that could be contributing to your morning headache is to keep a sleep diary for two weeks. It should have the time you went to bed, the time you woke up, how many times you think you woke during the day, what medications your took before bed, how much caffeine you consumed during the day and any unusual activities or exercising you may have done that day like shoveling snow, going to the gym or staying in bed because you were ill. Since we are looking for reasons you have a morning headache you should document what mornings you woke up with one. If you do not find a correlation between any type of behavior and the morning headache you should bring your sleep diary with you when you go to your doctor to discuss treatment for those morning headaches.
Just remember that a morning headache more then 2 times a week for more then a couple of weeks are not normal and you should not suffer with the problem.