The Prophet ﷺ stood in prayer until his feet became swollen. It was said to him, "Allah has forgiven you your past and future sins."He replied, "Should I not be a grateful servant?"
قام النبي ﷺ حتى تورمت قدماه، فقيل له: غفر الله لك ما تقدم من ذنبك وما تأخر، قال: أفلا أكون عبدا شكورا
Bukhari narrated it in the tafsir (4836), and Muslim narrated it in the description of the Resurrection, Paradise, and Hellfire (2819: 80), both of them via Sufyan bin Uyayna, who said, "Ziyad bin Alaqa narrated to us that he heard Mughira bin Shuba say," and then he related it. The wording given is that of Bukhari, and the wording of Muslim is similar.