The Prophet ﷺ used to stand in prayer until his feet became swollen. It was said to him, "Allah has already forgiven you your past and future sins."He replied, "Should I not then be a grateful servant?"
أخبرنا قتيبة بن سعيد ومحمد بن منصور واللفظ له عن سفيان عن زياد بن علاقة قال سمعت
قام النبي ﷺ حتى تورمت قدماه فقيل له قد غفر الله لك ما تقدم من ذنبك وما تأخر قال أفلا أكون عبدا شكورا
Bukhari narrated it in the tafsir, in the chapter on Allah's statement, "So that Allah may forgive you what has gone before of your sin" and what follows, hadith no. 4836. Muslim narrated it in the chapter on the characteristics of the hypocrites, in the chapter on doing many deeds and striving hard in worship, hadith no. 2819, from the hadith of Sufyan bin Uyayna, with this wording. It is also found in Al-Kubra, hadith no. 1325.