BackgroundPrevious studies have found that poor sleep quality promotes the occurrence of cognitive impairment (CI), but this relationship has been rarely reported in older adults hypertensive patients. The purpose of this study was to investigate the relationship between sleep quality and CI in older adults hypertensive patients and the mediating effect of sleep quality between physical activity (PA) and CI.MethodsA total of 2072 older adults hypertensive patients were included in this case–control study. Five hundred and eighteen older adults hypertensive patients with CI were matched 1:3 by age and sex to 1,554 older adults hypertensive patients with normal cognitive function. The International Physical Activity Questionnaire-Long Form, Pittsburgh Sleep Quality Index, and Mini-Mental State Examination were used to evaluate PA intensity, sleep quality, and cognitive function in older adults hypertensive patients. Multivariate logistic regression and the mediation package in R Language were used to analyze the relationship between sleep quality and CI and the mediating effect of sleep quality between PA intensity and CI in older adults hypertensive patients.ResultsAfter adjusting for all confounding factors, sleep quality was positively correlated with CI in older adults hypertensive patients (OR = 2.565, 95%CI: 1.958–3.360, p < 0.001), and this relationship also existed in the older adults hypertensive patients with education levels of primary school and below and junior high school and above (OR = 2.468, 95%CI: 1.754–3.473, p < 0.001; OR = 2.385, 95%CI: 1.367–4.161, p = 0.002). In addition, sleep quality mediated part of the mediating effect between PA intensity and CI in older adults hypertensive patients (Za*Zb: - 17.19339; 95%CI: −0.37312, −0.04194).ConclusionPoor sleep quality was associated with the occurrence of CI in older adults hypertensive patients, and this relationship also existed in older adults hypertensive patients with education levels of primary school and below and junior high school and above.