Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:7003ʿAlī b. ʿUmar al-Ḥāfiẓ > Ibn Ṣāʿid And al-Qāḍī al-Muḥāmilī > al-Ḥasan b. Mūsá b. al-Zayyāt > Isḥāq b. Manṣūr > Huraym b. Sufyān > al-Shaybānī > al-Shaʿbī > Ibn ʿAbbās

[Machine] That the Messenger of Allah, ﷺ , prayed on a deceased person three times after his death. And it is narrated from Isma'il ibn Zakariya from Al-Shaybani through his chain of narrators that he prayed on a grave after it was buried for two nights, which we mentioned in the Khilafiyyat.  

البيهقي:٧٠٠٣أخْبَرَنَا أَبُو بَكْرِ بْنُ الْحَارِثِ الْفَقِيهُ أنبأ عَلِيُّ بْنُ عُمَرَ الْحَافِظُ ثنا ابْنُ صَاعِدٍ وَالْقَاضِي الْمُحَامِلِيُّ قَالَ ثنا الْحَسَنُ بْنُ مُوسَى بْنِ الزَّيَّاتِ ثنا إِسْحَاقُ بْنُ مَنْصُورٍ ثنا هُرَيْمُ بْنُ سُفْيَانَ عَنِ الشَّيْبَانِيِّ عَنِ الشَّعْبِيِّ عَنِ ابْنِ عَبَّاسٍ

أَنَّ رَسُولَ اللهِ ﷺ صَلَّى عَلَى مَيِّتٍ بَعْدَ مَوْتِهِ بِثَلَاثٍ وَرُوِيَ عَنْ إِسْمَاعِيلَ بْنِ زَكَرِيَّا عَنِ الشَّيْبَانِيِّ بِإِسْنَادِهِ صَلَّى عَلَى قَبْرٍ بَعْدَمَا دُفِنَ بِلَيْلَتَيْنِ ذَكَرْنَاهُ فِي الْخِلَافِيَّاتِ