Sleep-disordered breathing (SDB) is linked to cognitive dysfunction. Although SDB is common in stroke patients, the impact of SDB and its early treatment on cognitive functioning after stroke remains poorly investigated. Therefore, we explored the association between SDB and post-stroke cognitive functioning, including the impact of early SDB treatment with adaptive servo-ventilation (ASV) on cognitive recovery from acute event to 3 months post-stroke. We used data from two studies, which included ischaemic stroke patients (n = 131) and no-stroke controls (n = 37) without SDB (apnea-hypopnea index, AHI <5/h) and with SDB (AHI≥20/h). Cognitive functioning was assessed within 7 days and 3 months post-stroke in stroke patients, or at study inclusion in no-stroke control group, respectively. Stroke patients with SDB were randomized to ASV treatment (ASV+) or usual care (ASV-). Linear regression adjusted for main confounders assessed the impact of SDB and its treatment on cognitive recovery. The intention-to-treat analysis did not show significant associations of SDB ASV+ (n = 30) versus SDB ASV- (n = 29) with cognitive recovery. In an exploratory subanalysis, compliant SDB ASV+ (n = 14) versus SDB ASV- showed improvements with ASV in visual memory and cognitive flexibility. Combining the stroke and non-stroke datasets, SDB (n = 85) versus no-SDB (n = 83) was associated with deficits in visual memory and response inhibition independently of stroke. SDB ASV- versus no-SDB (n = 51) was associated with less improvement in visual memory. There was no substantial evidence for benefits of intention-to-treat ASV on cognitive recovery. Exploratory analysis indicated that compliant ASV treatment could benefit visual memory and cognitive flexibility, whereas untreated SDB could contribute to a poor recovery of visual memory.