We were with the Messenger of Allah ﷺ when he laughed. He asked, "Do you know what made me laugh?"We said, "Allah and His Messenger know best."He said, "It is the way a servant addresses his Lord. He will say, 'My Lord, have You not granted me protection from injustice?'The Lord will reply, 'Yes indeed.'The servant will say, 'I will not accept any witness against me except one from myself.'The Lord will say, 'Your own self suffices as a witness against you today, along with the noble recording angels as witnesses.'Then his mouth will be sealed, and his limbs will be told, 'Speak.'So they will speak of his deeds. Then he will be allowed to speak again, and he will say to his limbs, 'Away with you, and ruin upon you. It was on your behalf that I was contending.'"
كنا عند رسول الله ﷺ، فضحك، فقال: هل تدرون مم أضحك؟ قال: قلنا: الله ورسوله أعلم. قال: من مخاطبة العبد ربه. يقول: يا رب، ألم تجرني من الظلم؟ قال: يقول: بلى. قال: فيقول: فإني لا أجيز على نفسي إلا شاهدا مني. قال: فيقول: كفى بنفسك اليوم عليك شهيدا، وبالكرام الكاتبين شهودا، قال: فيختم على فيه، فيقال لأركانه: انطقي. قال: فتنطق بأعماله، قال: ثم يخلى بينه وبين الكلام، قال: فيقول: بعدا لكن وسحقا. فعنكن كنت أناضل.
Muslim narrated it in Zuhd wa Raqaiq (2969) from Abu Bakr bin Nadr bin Abu Nadr, Abu Nadr Hashim bin Qasim narrated to me, Ubaydullah Ashjai narrated to us from Sufyan Thawri, from Ubayd Muktab, from Fudayl, from Shaybi, from Anas bin Malik, who mentioned it.