This study explored the relationship between intergenerational parenting stress and sleep quality in older adults, examining the mediating role of emotional balance and the moderating role of trait mindfulness. Using the Grandparenting Stress Questionnaire, Positive and Negative Affect Schedule, Mindful Attention Awareness Scale, and Pittsburgh Sleep Quality Index, data were collected from 353 older adults engaged in intergenerational parenting in Shanghai. The results revealed: (1) Intergenerational parenting stress significantly predicted sleep quality in older adults, with emotional balance partially mediating this relationship; (2) Both the direct and indirect paths linking intergenerational parenting stress to sleep quality were moderated by trait mindfulness, such that the direct effect and indirect effect were weaker among individuals with high trait mindfulness compared to those with low trait mindfulness. These findings suggest that intergenerational parenting stress influences older adults' sleep quality through both a direct pathway and an indirect pathway mediated by emotional balance, while trait mindfulness functions as a protective moderator.