Background: Cognitive functioning changes with age, sleep, and the circadian rhythm. We investigated whether these factors are independently associated with different cognitive domains assessed in middle-aged and elderly persons. Methods: In 1723 middle-aged and elderly persons (age 62 +/- 9.4 years, mean +/- standard deviation, SD) of the Rotterdam Study, we collected actigraphy recordings of on average 138 h. Actigraphy was used to quantify 24-h rhythms by calculating the stability of the rhythm over days and the fragmentation of the rhythm. Sleep parameters including total sleep time, sleep-onset latency, and wake after sleep onset were also estimated from actigraphy. Cognitive functioning was assessed with the word learning test (WLT), word fluency test (WFT), letter digit substitution task (LDST), and Stroop color word test (Stroop). Results: Persons with less stable 24-h rhythms performed worse on the LDST (B = 0.42 per SD increase, p = 0.004) and the Stroop interference trial (B = -1.04 per SD increase, p = 0.003) after full adjustment. Similarly, persons with more fragmented rhythms performed worse on the LDST (B = -0.47 per SD increase, p = 0.002) and the Stroop (B = 1.47 per SD increase, p < 0.001). By contrast, longer observed sleep-onset latencies were related to worse performance on the WLT delayed recall (B = -0.19 per SD increase, p = 0.027) and the WFT (B = -0.45 per SD increase, p = 0.007). Conclusions: Disturbances of sleep and the 24-h activity rhythm were independently related to cognition; while persons with longer sleep-onset latencies had worse performance on memory and verbal tasks, persons with 24-h rhythm disturbances performed less on executive functioning and perceptual speed tasks. (C) 2015 Elsevier B.V. All rights reserved.