This study aimed to examine the possible cross-sectional mediating role of sleep in the relationship of gratitude with depression and anxiety in patients with chronic pain. A total of 224 patients with chronic pain completed structured questionnaires assessing chronic pain, depression and anxiety symptoms, gratitude, and sleep disturbances. Results of multiple regression analyses yielded a modest mediating effect for sleep on the gratitude-depression link whereas a stronger mediating effect was found for sleep on the gratitude-anxiety link. These data show much of the effect of gratitude on depression was direct whereas sleep exerted a stronger mediating effect on the gratitude-anxiety link.