“Ibn Juraij said to me: “Ubaidullah bin Abi Yazid informed me that Ibn Abbas said: “A man came to the Prophet and said: ‘O Messenger of Allah! I had a dream at night while I was sleeping, in which I was praying behind a tree, when I prostrated, the tree prostrated along with me. Then I heard it saying: “O Allah! Record for me a reward with You for it, remove a sin from me by it, and store it away for me with You for it, and accept it from me as You accepted it from Your worshipper Dawud (Allāhumma uktub lī bihā ʿindaka ajran, waḍaʿ ʿannī bihā wizran, wajʿalhā lī ʿindaka dhukhran, wa taqabbalhā minnī kamā taqabbalta min ʿabdika Dāwūd).” Al-Hasan said: “Ibn Juraij said to me: ‘Your grandfather said to me: “Ibn Abbas said: ‘So the Prophet recited (an Ayah of) prostration, then prostrated.’” [He said] “So Ibn Abbas said: ‘I listened to him, and he was saying the same as the man informed that the tree had said.’”
جَاءَ رَجُلٌ إِلَى النَّبِيِّ ﷺ فَقَالَ يَا رَسُولَ اللَّهِ رَأَيْتُنِي اللَّيْلَةَ وَأَنَا نَائِمٌ كَأَنِّي أُصَلِّي خَلْفَ شَجَرَةٍ فَسَجَدَتِ الشَّجَرَةُ لِسُجُودِي وَسَمِعْتُهَا وَهِيَ تَقُولُ اللَّهُمَّ اكْتُبْ لِي بِهَا عِنْدَكَ أَجْرًا وَضَعْ عَنِّي بِهَا وِزْرًا وَاجْعَلْهَا لِي عِنْدَكَ ذُخْرًا وَتَقَبَّلْهَا مِنِّي كَمَا تَقَبَّلْتَهَا مِنْ عَبْدِكَ دَاوُدَ قَالَ ابْنُ جُرَيْجٍ قَالَ لِي جَدُّكَ قَالَ ابْنُ عَبَّاسٍ فَقَرَأَ النَّبِيُّ ﷺ سَجْدَةً ثُمَّ سَجَدَ قَالَ ابْنُ عَبَّاسٍ فَسَمِعْتُهُ وَهُوَ يَقُولُ مِثْلَ مَا أَخْبَرَ الرَّجُلُ عَنْ قَوْلِ الشَّجَرَةِ