See your PCP. Obstructive Sleep Apnea should be considered in the differential diagnosis of morning headaches and headaches which awaken the patient in the middle of the night. These headaches can also appear after a long afternoon nap. See your PCP for evaluation, diagnosis and possible referral to orofacial pain practitioner.
Source of pain. Best treatment is to find out the cause, if possible. A pain diary is recommended to keep track of what activities and nutrition you had the day and night before. Then you should see a doctor for a history and a exam. Could very well be a night grinding issue where a dentist/tmj specialist may be needed.