It was mentioned in the presence of Ayesha that Ibn Umar attributed to the Prophet ﷺ the saying, "The deceased is punished in his grave because of his family's weeping over him."She said, "He is mistaken. What the Messenger of Allah ﷺ actually said was, 'The deceased is punished for his own sins and wrongdoings, while his family is weeping over him at that very moment.'And that is like his saying that the Messenger of Allah ﷺ stood at the well on the day of Badr, in which lay the slain polytheists of Badr, and said to them what he said. They reported him as saying, 'They hear what I say,' but he is mistaken. What he actually said was, 'They now know that what I used to tell them is the truth.'"Then she recited, "Indeed, you cannot make the dead hear" and "nor can you make those in the graves hear" [Fatir 35:22], saying, "This refers to when they have taken their seats in the Fire."
ذكر عند عائشة أن ابن عمر يرفع إلى النبي ﷺ: إن الميت يعذب في قبره ببكاء أهله عليه فقالت: وهل، إنما قال رسول الله ﷺ: إنه ليعذب بخطيئته وذنبه، وإن أهله ليبكون عليه الآن وذلك مثل قوله: إن رسول الله ﷺ قام على القليب يوم بدر، وفيه قتلى بدر من المشركين فقال لهم ما قال: إنهم يسمعون ما أقول، وقد وهل، إنما قال: إنهم الآن ليعلمون أن ما كنت أقول لهم حق ثم قرأت: {إنك لا تسمع الموتى} {وما أنت بمسمع من في القبور} [فاطر: ٢٢] يقول: حين تبؤوا مقاعدهم من النار.
Bukhari narrated it in the Book of Military Expeditions (3978), and Muslim in the Book of Funerals (932), both of them through Abu Usama, from Hisham bin Urwa, from his father, and he mentioned it.