I use to get headaches while I slept. I would know the headache was starting during the night but was to sleepy to wake up all the way to do anything. Due to other things I went for a sleep study and found out I have sleep apnea. Headaches can be a symptom of sleep apnea. Just something for you to consider. I did have other things happening at night.