Background Obstructive sleep apnea (OSA) is a prevalent disorder with multiple consequences including negative effects on neurocognitive function. Several domains of cognitive function are impaired in OSA patients, but the mechanisms through which this sleep disorder results in impairment are not clear. Given the well-known effects of cortisol on cognitive function, in particular memory, the dysregulating effects of OSA on cortisol levels are hypothesized as a potential pathway leading to cognitive impairment. Methods Fifty-five participants with OSA (mean apnea-hypopnea index [AHI], 30.3) were assessed over 2days. Over a 24-h period, blood samples were collected every 2h to examine cortisol levels. The following night, sleep was monitored with polysomnography (PSG). Participants were given a battery of neurocognitive tests, which assessed seven cognitive domains. Results OSA severity assessed by oxygen desaturation index (ODI) was associated with 24-h cortisol levels. AHI, ODI, and nighttime cortisol levels were associated with global deficit scores (GDS) in cognitive functioning, particularly in domains of learning, memory, and working memory (P <.05 for all). Hierarchical linear regression analysis revealed that nighttime cortisol accounted for 9–16% of variance in learning (P =.018), memory (P =.003), and working memory (P =.016) domains, though apnea severity did not significantly predict any additional variance. Conclusions In our sample of patients with OSA, nocturnal cortisol levels were associated with neuropsychologic functioning above and beyond the influence of covariates and apnea severity. These findings suggest that OSA-related alterations in cortisol activity may partially explain the pathophysiology of neuropsychologic impairments in sleep apnea.