Aims: To assess sleep quality in patients with primary headaches before and after prophylactic treatment using a validated sleep-screening instrument. Materials and Methods: A total of 147 patients, including 63 tension type headache (TTH) and 84 migraine patients were included. Patients were examined in terms of frequency and severity of headaches and sleep quality before and 12 weeks after prophylactic treatment with either propranolol or amitriptyline. Results: Baseline Visual Analogue Score (VAS) in migraine patients was 7.99 +/- 1.39 compared with 6.86 +/- 1.50 in TTH group (P < 0.001). VAS score after the first month of treatment was 6.08 +/- 1.88 in migraine patients and 5.40 +/- 1.61 in TTH (P = 0.023). VAS scores decreased after the third month of treatment to 4.32 +/- 2.29 in migraine patients and 4.11 +/- 1.66 in TTH patients (P = 0.344). The decrease was significant for patients treated with amitriptyline but not for those with propranolol. Baseline Pittsburgh Sleep Quality (PSQI) scores were 5.93 +/- 2.43 in migraine patients and 6.71 +/- 2.39 in TTH patients. Poor quality of sleep (PSQI = 6) prior to prophylactic treatment was observed in 61.4% of migraine patients and in 77.7% of TTH patients. Comparison of PSQI scores before and 3 months following treatment showed significantly improved quality of sleep in all treatment groups; the greatest significance was detected in migraine patients with initial PSQI scores of = 6 and treated with amitriptyline (P < 0.001). Conclusions: Increased understanding of routine objective sleep measures in migraine patients is needed to clarify the nature of sleep disturbances associated with primary headaches. This may in turn lead to improvements in headache treatments.