BACKGROUND: With the acceleration of population aging, cognitive impairment and depression have become serious public health challenges in countries around the world. The influencing factors of cognitive trajectory, depression trajectory, and dual trajectories in middle-aged and elderly adults have not been fully studied. METHODS: This study used data from the China Health and Retirement Longitudinal Study database spanning from 2011-2018. Group-based trajectory modelling and group-based dual trajectory modelling were employed to examine different trajectories. Restricted cubic spline and multivariate logistic regression analysis were used to elucidate the relationship between sleep duration and grip strength with these different trajectories. Mediation analysis was conducted to explore the mediating roles of sleep duration and grip strength in the activities of daily living (ADLs) and their impact on these trajectories. RESULTS: Trajectory analysis identified two longitudinal patterns of cognitive function and depression scores: low and high cognitive group, low and high depression group, respectively, and two states of the dual trajectories of cognition and depression: the stable state group and the state decline group. Sleep duration and grip strength were associated with the cognitive trajectory, depression trajectory and dual trajectories. Sleep duration has an inverted U-shaped relationship with cognitive trajectory. Grip strength was nonlinearly associated with the above trajectories. The mediation effects of sleep duration in the association between ADLs and cognitive, depression and dual trajectories were 3.14, 6.14, and 2.70%. While the mediation effects of grip strength were 7.21, 1.67 and 6.24%, respectively (P <
0.05). CONCLUSIONS: Sleep duration and grip strength were not only associated with cognitive, depression, and dual trajectories, but also partially mediate the relationship between ADLs and these trajectories. This study will provide a basis for how to intervene in the cognitive and mental health of middle-aged and elderly adults.