Middle-aged and older persons living with HIV (PLWH) suffer from sleep distress and cognitive disorders due to HIV infection and aging. We aim to explore the relationship between sleep satisfaction and cognitive complaints, and the mediating role of anxiety and fatigue in this relationship among middle-aged and older PLWH. We used data from a multicenter cross-sectional study in China (Shanghai, Kunming, Nanning, Hengyang, and Changning) conducted in 2017. The data analysis included 435 PLWH aged 45 years and over. Multiple linear regression models showed that worse sleep satisfaction was significantly associated with lower cognitive complaints after controlling for anxiety, fatigue, demographic variables, and clinical variables (β = -0.246, p < 0.01). Both anxiety and fatigue were significant partial mediators in the relationship between sleep satisfaction and cognitive complaints. The serial multiple mediation models of sleep satisfaction-anxiety (M1)-fatigue (M2)-cognitive complaints were supported and the alternative model of sleep satisfaction-fatigue (M2)-anxiety (M1)-cognitive complaints were both supported. Our study indicates that it is important to improve sleep quality to promote cognitive function among Chinese middle-aged and older PLWH. Prevention and treatment programs for sleep satisfaction and cognitive function should include the assessment and reduction of fatigue and anxiety.