The Messenger of Allah ﷺ said, "When a servant is placed in his grave and his companions turn away from him, he hears the sound of their sandals. Two angels come to him, sit him up, and ask, 'What did you used to say about this man, Muhammad?'As for the believer, he says, 'I testify that he is the servant of Allah and His Messenger.' He is then told, 'Look at your seat in the Fire. Allah has replaced it for you with a seat in Paradise.' He sees both of them.As for the hypocrite and the disbeliever, he is asked, 'What did you used to say about this man?' He replies, 'I do not know. I used to say what the people said.' He is told, 'You did not know, nor did you follow those who knew.' Then he is struck with iron hammers a single blow, and he lets out a scream that is heard by everything near him except humans and jinn."
أن رسول الله ﷺ قال: إن العبد إذا وضع في قبره وتولى عنه أصحابه- إنه يسمع قرع نعالهم- أتاه ملكان فيقعدانه فيقولان: ما كنت تقول في هذا الرجل لمحمد؟ فأما المؤمن فيقول: أشهد أنه عبد الله ورسوله فيقال له: انظر إلى مقعدك من النار، قد أبدلك الله به مقعدا من الجنة فيراهما جميعا، وأما المنافق والكافر فيقال له: ما كنت تقول في هذا الرجل؟ فيقول: لا أدري، كنت أقول ما يقول الناس فيقال: لا دريت ولا تليت، ويضرب بمطارق من حديد ضربة، فيصيح صيحة يسمعها من يليه غير الثقلين.
Bukhari related it in the Book of Funerals (1338), and Muslim in the Description of Paradise (287/2870), both from the hadith of Yazid bin Zuray, who said, Saeed bin Abu Aruba narrated to us, from Qatada, from Anas, and he mentioned it, and their wordings are close to each other. In Muslim's version, Qatada said, "It was mentioned to us that his grave will be made spacious for him, seventy cubits, and it will be filled for him with greenery until the day they are raised."