Objective To investigate the relationship between sleep factors (sleep duration and sleep complaints) and human papillomavirus (HPV) infection in adult women based on the data of National Health and Nutrition Examination Survey (NHANES). Methods A total of 7844 women aged 20-59 years with valid HPV testing and complete sleep survey data from the 2005-2016 cycles of the NHANES database were included in the study. Weighted logistic regression was used to analyze the relationship between sleep duration, sleep complaints and HPV infection. Subgroup analyses and sensitivity analyses were performed to ensure robustness. Results Among the 7844 participants, 3439 participants (43.8%) tested positive for HPV; participants with abnormal sleep duration and sleep complaints were 3179 (weighted prevalence: 36.35%) and 2285 (weighted prevalence: 31.02%), respectively. After adjusting for all other covariates considered, abnormal sleep duration [short sleep duration: odds ratio (OR)=1.18, 95% confidence interval (CI) (1.04, 1.35), P<0.05; long sleep duration: OR=1.52, 95%CI (1.14, 2.03), P<0.05] and sleep complaints [OR=1.17, 95%CI (1.00, 1.38), P<0.05] were both positively associated with HPV infection. Conclusions Sleep duration and sleep complaints are correlated with HPV infection among women aged 20-59 years in the United State. Poor sleep quality elevates the risk of HPV infection. Improving sleep quality and maintaining adequate sleep duration may help reduce the risk of HPV infection in women.