Toward the end of his life, whenever the Prophet ﷺ sat in a long gathering and then rose to leave, he would say, "Glory be to You, Allah, and praise be to You. I bear witness that there is no god but You. I seek Your forgiveness and turn to You in repentance."One of us said to him, "These are words we never used to hear from you before."The Messenger of Allah ﷺ replied, "This is an expiation for whatever may have occurred in the gathering."
حدثنا عبد الله بن نمير أنبأنا حجاج عن أبي هاشم الواسطي عن رفيع أبي العالية
كان النبي ﷺ بآخرة إذا طال المجلس فقام قال سبحانك اللهم وبحمدك أشهد أن لا إله إلا أنت أستغفرك وأتوب إليك فقال له بعضنا إن هذا قول ما كنا نسمعه منك فيما خلا فقال رسول الله ﷺ هذا كفارة ما يكون في المجلس