First of all, don't self-diagnose or assume it's necessarily serious just because it's been going on - but that's also no reason to do nothing about it. A few months is a long time, and the fact that you don't feel properly rested even with 7-8 hours of sleep is important information. It could be linked to tons of factors: sleep quality rather than duration, your pillow position, nighttime dehydration, sleep apnea, muscle tension, or even just caffeine compensating for a real lack of rest.
What I'd suggest before you freak out: check your sleep environment (temperature, light, noise), try a week without coffee in the morning to see if it makes a difference, and note exactly what the pain feels like - is it like a hammer pounding, a band tightening, is it pulsing? If you snore, if you're gasping at night, if you have apneas, those are clues. Also hydrate better during the day, especially in the evening.
After a week or two of keeping track, if it persists or gets worse, actually see a doctor. A doctor can check your blood pressure, rule out chronic migraines, sleep apnea or whatever else. It's not an emergency for tomorrow, but it's not nothing either - you deserve to wake up without a headache, you know.