Human leucocyte antigen (HLA) DQB1*0602 allele, a well-known genetic risk factor for narcolepsy, has been associated with sleep parameters in healthy subjects. We aimed to assess the association of this allele with daytime sleepiness and altered sleep electroencephalogram characteristics in the general population and in patients with obstructive sleep apnoea syndrome (OSAS). Eight hundred and ninety-four individuals from the Epidemiologic Study of Sleep were genotyped for the HLA DQB1*0602 allele. Full-night polysomnography was performed, and daytime sleepiness was analysed according to the Epworth Sleepiness Scale. HLA-DQB1*0602 allele-positive and -negative subjects in the general population, as well as in patients with OSAS, exhibited similar sleep parameters and levels of daytime sleepiness. However, spectral analysis showed that allele-positive individuals with OSAS exhibited higher theta power during sleep Stage 1 (P < 0.05) in occipital derivations, and lower delta power during sleep Stages 1 and 2 (P < 0.01) compared with individuals negative for the allele, even after correction for potential confounders as age, sex, body mass index and European ancestry. No significant differences in the electroencephalogram variables were found in individuals without OSAS. The data highlight the HLA-DQB1*0602 as a potential genetic factor influencing sleep physiology in individuals diagnosed with OSAS.