Pain is common among older adults and negatively impacts functioning. Sleep disturbances and mood disorders, specifically depression and anxiety, are closely associated with pain in older individuals, but the directionality of these associations remains unclear. In this study, we deconstruct long-term temporal effects of two key insomnia symptoms on incident pain into direct and indirect pathways, with focus on depression and anxiety symptoms, within a nationally representative sample. We utilized 2011-2013 data from the National Health and Aging Trends Study, a longitudinal survey of 2239 community-dwelling Medicare beneficiaries. Participants completed annual in-person interviews with assessments of sleep initiation and maintenance; depression, and anxiety (using the Patient Health Questionnaire-2 [PHQ-2] and the Generalized Anxiety Disorder Scale-2 [GAD-2] respectively); and bothersome pain. Causal mediation analysis was applied to examine direct effects of the two insomnia symptoms at baseline on incident pain, and their indirect effects through depression and anxiety symptoms. Almost one-third of the study participants were 69 years old or younger. A similar proportion reported bothersome pain in 2013. The two baseline insomnia symptoms predicted the development of pain. Adjusted analyses suggested that compared to older adults without the two baseline insomnia symptoms, participants with sleep initiation or maintenance difficulties had 24% (95% confidence interval [CI] 2%,51%) and 28% (95% CI 4%,55%) higher odds of incident pain, respectively. Anxiety symptoms partially mediated the relationship between the insomnia symptoms and incident pain, accounting for up to 17% of the total effect, but depressive symptoms did not. These results suggest that improved sleep or anxiety could reduce the risk for future pain.