Background: Sleep disorders are common in people with multiple sclerosis (PwMS) and could contribute to cognitive dysfunction. However, effects of pathological sleep on cognitive domains are insufficiently characterized. Objective: To evaluate associations between cognitive performance and polysomnographic (PSG)-based sleep disturbances in PwMS. Methods: PwMS with known/suspected untreated obstructive sleep apnea (OSA, N = 131) underwent PSG and cognitive tests: Symbol Digit Modalities Test (SDMT), Paced Auditory Serial Addition Test (PASAT), California Verbal Learning Test-II (CVLT-II), Brief Visuospatial Memory Test-Revised (BVMT-R Total and Delayed), Judgment of Line Orientation (JLO), Controlled Oral Word Association Test (COWAT), Trail Making Test, Go/No-Go, and Nine-Hole Peg Test (NHPT). Results: Apnea severity measures were associated with worse processing speed, attention, and working memory (SDMT); immediate and delayed visual memory (BVMT-R Total and Delayed); attention, psychomotor speed, and cognitive flexibility (Trails); and manual dexterity and visuomotor coordination (NHPT) ( ps ⩽ 0.011). Sleep macrostructure measures showed stronger associations with verbal memory and response inhibition (CVLT-II Total Recognition Discriminability Index), and immediate visual memory (BVMT-R Total) ( ps ⩽ 0.011). Conclusions: Pathological sleep, including hypoxia, sleep fragmentation, and disturbances in sleep/wake states, are differentially associated with worse cognitive performance in PwMS. These findings could inform future personalized approaches to cognitive impairment in PwMS with sleep disorders. Trial registration: ClinicalTrials.gov identifier: NCT02544373 ( https://clinicaltrials.gov/ct2/show/NCT02544373 ).