The Prophet ﷺ said, "When a servant is placed in his grave, his companions turn away, and he can still hear the sound of their sandals as they leave, two angels come to him, sit him up, and ask him, 'What did you used to say about this man, Muhammad?'The believer answers, 'I bear witness that he is the servant of Allah and His Messenger.'It is then said to him, 'Look at your seat in the Fire. Allah has exchanged it for a seat in Paradise.'"The Prophet ﷺ said, "He sees both of them.As for the disbeliever or the hypocrite, he says, 'I do not know. I used to say what the people said.'It is said to him, 'You did not know, nor did you follow those who knew.' Then he is struck with an iron hammer between his ears, 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 related it in the Book of Paradise and Hell (2870), both from the hadith of Qatada, who said, "Anas bin Malik narrated to us," and he mentioned it.Qatada said, "It was mentioned to us that his grave is expanded seventy cubits for him, and it is filled with greenery for him until the day they are resurrected."As for his saying, "Everyone near him hears it except the two weighty ones," the two weighty ones are mankind and the jinn, for they cannot hear what is done to the one in the grave, and all of this occurs in a realm other than our own.Whoever says that this indicates the life of the dead person in the grave has contradicted the apparent, perceptible reality, for the life in the other realm, which is the realm of the barzakh, is something we know nothing about except what Allah the Exalted and His Messenger have informed us of, and we cannot measure it against our worldly realm.As for prompting before death, there is no disagreement about that.