BackgroundChina is among the largest and fastest aging countries. The elderly population is more vulnerable, with higher proportion of inappropriate sleep duration and risk of mortality, compared with young and middle-aged adults. Single-measured sleep duration has been associated with mortality, but the health effects of long-term sleep duration trajectories remain unknown. This study aimed to explore the prospective associations between sleep duration trajectories and all-cause mortality among Chinese elderly.MethodsParticipants (n= 3,895; median age: 82 years; females: 53.3%) who reported sleep duration in all three surveys (2005, 2008, and 2011) from the community-based Chinese Longitudinal Healthy Longevity Survey (CLHLS) were followed up until 2019 (about 8 years). We identified sleep duration trajectories by latent class mixed model and explored their association with all-cause mortality using Cox hazard proportional regression and Laplace regression models. Further, stratified analysis by demographic characteristics and lifestyles and sensitivity analysis by lag effect, health-related factors, and inverse probability weighting were used to verify the robustness of the association. In addition, we explored the threshold effect of baseline sleep duration on the risk of all-cause mortality.ResultsWe documented 1,881 all-cause deaths during 16,689 person-years of follow-up. Five sleep duration trajectories were identified: moderately increased trajectory (28.1%), rapidly increased trajectory (7.2%), persistent sleep trajectory of 7 h (33.7%), moderately decreased trajectory (21.3%), and rapidly decreased trajectory (9.7%). Compared with the persistent sleep trajectory of 7 h, the multivariable-adjustedHRs(95%CI) for moderately increased trajectory, rapidly increased trajectory, moderately decreased trajectory, and rapidly decreased trajectory were 1.21 (1.08, 1.36), 1.21 (1.01, 1.44), 0.95 (0.82, 1.10), and 0.93 (0.78, 1.11), respectively; and the corresponding difference in median survival time (95%CI) were -0.53 (-1.01, -0.05), -0.43 (0.16, -1.02), 0.26 (-0.34, 0.86), and 0.25 (-0.51, 1.02), respectively. Stratified and sensitivity analyses showed consistent results. Threshold analysis indicated a sharply increased risk of mortality in participants whose sleep exceeds 9 h (HR= 1.20, 95%CI: 1.11, 1.30).ConclusionCompared with the persistent sleep trajectory of 7 h, moderately and rapidly increased sleep duration trajectories were associated with higher subsequent mortality in Chinese elderly. Those who report sleep exceeding 9 h may be at high risk for all-cause mortality.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12889-023-15894-3.