Ibn ‘Abbas said that God's messenger came upon a grave where an interment had taken place at night and asked when this person had been buried. On being told that he had been buried the previous night, he asked why they had not informed him. They told him that they had conducted the burial in the darkness of night and had not liked to waken him, whereupon he stood up, and when they formed a row behind him he prayed over the dead.
Abu Huraira said that a negress (or a youth) used to sweep the mosque. God’s messenger missed her, and when he asked about her (or him) the people told him he had died. He asked why they had not informed him, and it appeared as if they had treated her (or him) as of little account. He asked the people to lead him to the grave, and when they did so he prayed over her (The wording of this tradition causes some difficulty owing to the indefiniteness as to whether the person was a man or a woman. Sometimes the alternative is mentioned, as in the translation, but sometimes merely the masculine singular pronoun and at others merely the feminine singular pronoun is used) and then said, "These graves are full of darkness for their occupants, but God will illuminate them for them by reason of my prayer over them.”
Abu Salama b. ‘Abd ar-Rahman told how, when Sa'd b. Abu Waqqas died, ‘A’isha said, “Take him into the mosque so that I may pray over him.” When objection was made to this she said, “I swear by God that God’s messenger prayed in the mosque over Suhail and his brother, the sons of Baida’. ”