Abstract
BACKGROUND: Rheumatoid arthritis (RA) is a prevalent chronic autoimmune disease associated with substantial disability as well as socioeconomic burden. Emerging evidence suggests that sleep disturbances may increase RA risk, yet the roles of sleep quality, sleep duration, as well as their long-term patterns remain unclear. Depression—a key psychoneuroimmunological factor—may mediate this association. The research aimed to explore the relationships of sleep quality (SQ), sleep duration (SD) and incident RA, as well as to explore the mediating role of depressive symptoms as well as the effects of long-term sleep trajectories. METHODS: Data were obtained from the English Longitudinal Study of Ageing (ELSA), including adults free of RA at baseline. Cox proportional hazards models were employed to estimate the connection of SQ and SD with incident RA, adjusting for demographic, lifestyle, and health-related factors. Mediation analysis quantified the indirect effects of depressive symptoms. Group-based multi-trajectory modeling (GBMTM) was further applied to identify joint trajectories of SQ and SD and assess their connection with RA risk. RESULTS: During follow-up, 607 participants developed RA. Compared with those reporting good SQ, individuals with moderate (HR = 1.23, 95% CI: 1.02–1.48) or poor (HR = 1.50, 95% CI: 1.20–1.87) SQ had a significantly higher risk of RA. A linear connection was observed between shorter SD and increased RA risk, with each 1-hour reduction in sleep related with approximately 7% higher risk (HR = 1.07, 95% CI: 1.01–1.17). Depression partially mediated the associations between SQ, SD, and RA risk, accounting for about 40% and 44% of the total effects, respectively. GBMTM identified three distinct sleep trajectory groups, with the “persistently poor-quality/short-sleep” trajectory showing the highest RA risk (OR = 1.70, 95% CI: 1.11–2.56). CONCLUSION: Poor SQ and shorter SD are independently related with an elevated risk of RA among middle-aged and older adults, partly mediated by depression. Persistent adverse sleep patterns confer cumulative risk, highlighting the potential of sleep and mood management as modifiable targets for primary prevention of RA. SUPPLEMENTARY INFORMATION: The online version contains supplementary material available at 10.1186/s13075-026-03784-z.