Objective: Previous research suggests a positive association between pain, depression and sleep. In this study, we investigate how sleep correlates with varying levels of pain and depression in nursing home (NH) patients with dementia.Materials and methods: Cross-sectional study (n = 141) with sleep-related data, derived from two multicenter studies conducted in Norway. We included NH patients with dementia according to the Mini-Mental State Examination (MMSE ≤ 20) from the COSMOS trial (n = 46) and the DEP.PAIN.DEM trial (n = 95) whose sleep was objectively measured with actigraphy. In the COSMOS trial, NH patients were included if they were ≥65 years of age and with life expectancy >6 months. In the DEP.PAIN.DEM trial, patients were included if they were ≥60 years and if they had depression according to the Cornell Scale for Depression in Dementia (CSDD ≥ 8). In both studies, pain was assessed with the Mobilization-Observation-Behavior-Intensity-Dementia-2 Pain Scale (MOBID-2), and depression with CSDD. Sleep parameters were total sleep time (TST), sleep efficiency (SE), sleep onset latency (SOL), wake after sleep onset (WASO), early morning awakening (EMA), daytime total sleep time (DTS) and time in bed (TiB). We registered use of sedatives, analgesics, opioids and antidepressants from patient health records and adjusted for these medications in the analyses.Results: Mean age was 86.2 years and 76.3% were female. Hierarchical regressions showed that pain was associated with higher TST and SE (p < 0.05), less WASO (p < 0.01) and more DTS (p < 0.01). More severe dementia was associated with more WASO (p < 0.05) and TiB (p < 0.01). More severe depression was associated with less TST (p < 0.05), less DTS (p < 0.01) and less TiB (p < 0.01). Use of sedative medications was associated with less TiB (p < 0.05).Conclusion: When sleep was measured with actigraphy, NH patients with dementia and pain slept more than patients without pain, in terms of higher total sleep time. Furthermore, their sleep efficiency was higher, indicating that the patients had more sleep within the time they spent in bed. Patients with more severe dementia spent more time awake during the time spent in bed. Furthermore, people with more severe depression slept less at daytime and had less total sleep time Controlling for concomitant medication use did not affect the obtained results.