Shaykh al-Albaanee rahimahullaah said in as-Saheehah vol. 6a, pp. 605:
“Indeed your actions are shown to your relatives and your family from the deceased; so if they are good then they rejoice because of that – and if they are other than that they say: ‘O Allaah do not cause them to die until you guide them, just as you have guided us’.”
Reported by Ahmad 3/64-165 with a chain of narration from Sufyaan from the one who heard Anas bin Maalik say: then he mentioned the narration – which is attributed to the Prophet sallAllaahu `alaihi wa sallam.
Shaykh al-Albaanee rahimahullaah also mentioned the narration of Aboo Ayyoob al-Ansaaree radiyAllaahu `anhu [ibid.]:
“… Verily your actions are shown to your relatives and your family from the people of the Hereafter; if they are good they become happy and rejoice, and they say: ‘O Allaah this is from Your favor and Your mercy, so perfect your blessing upon him and cause him to die upon that.’ And the actions of the one who commits evil will be shown to them, so they will say: ‘O Allaah guide him to righteous action that You are pleased with from him, and that will bring him closer to You.”
Reported by at-Tabaraanee in al-Kabeer 1/194/2 and in al-Awsat 1/72/1-2; and Abdul-Ghanee al-Maqdisee in as-Sunan 1/198.
Allaah the Most High said:
وَقُلِ اعْمَلُوا فَسَيَرَى اللَّهُ عَمَلَكُمْ وَرَسُولُهُ وَالْمُؤْمِنُونَ ۖ وَسَتُرَدُّونَ إِلَىٰ عَالِمِ الْغَيْبِ وَالشَّهَادَةِ فَيُنَبِّئُكُم بِمَا كُنتُمْ تَعْمَلُونَ
[[Meaning: And say: “Do as you wish, for Allah will see your deeds, and so will His Messenger, and the believers. And you will be returned to the Knower of the unseen and the witnessed, and He will inform you of what you used to do.”]]
Ibn Katheer says in explanation of this verse:
“And it has been reported: that the actions of the living are shown to the dead from their relatives and their family while they are alive in their graves as Aboo Daawood at-Tayaalisee said: as-Salt bin Deenaar narrated to us: from al-Hasan, from Jaabir bin Abdillaah that he said: ‘The Messenger of Allaah sallAllaahu `alaihi wa sallam said: ˂Indeed your actions are shown to your relatives and your family in their graves; so if they are good then they rejoice because of that – and if it is other than that they say: O Allaah guide them to act in Your obedience.˃ [Musnad at-Tayaalisee no. 1794]
Ibn Katheer also mentions in explanation of Sooratur-Room verses 52-53:
“The deceased person knows about the actions of the living from his relatives and his brothers. Abdullaah ibnul-Mubaarak said: Thawr bin Yazeed narrated to me, from Ibraaheem, from Ayyoob that he said: ‘The actions of the living are shown to the deceased; so if they see good they become happy and rejoice, and if they see evil they say: O Allaah return him!’
…
And regarding this there are many narrations from the Companions, and some of the Ansaar from the relatives of Abdullaah bin Rawaahah would say: ‘O Allaah I seek refuge in You from doing an action that would cause me to be disgraced in front of `Abdullaah bin Rawaahah.’ He would say that after Abdullaah was killed as a martyr.”