Jami` at-Tirmidhi, Volume 1, Book 4, Hadith 579 (DarusSalam)

Al-Hasan bin Muhammad bin Ubaidullah bin Abi Yazid said: Ibn Juraij said to me: O Hasan! 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: (Allahummaktuh li biha indaka ajran, wad a anni biha wizran, waj'alha li biha indaka dhukhran, wa taqabbalha minni kama taqabbaltaha min abdiki Dawud.)" (O Allah! Record for me, a reward with You for it, remove a sin for me by it, and store it away for me with You, and accept it from me as You accepted it from Your worshipper Dawud). 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.'"

حَدَّثَنَا قُتَيْبَةُ، حَدَّثَنَا مُحَمَّدُ بْنُ يَزِيدَ بْنِ خُنَيْسٍ، حَدَّثَنَا الْحَسَنُ بْنُ مُحَمَّدِ بْنِ عُبَيْدِ اللَّهِ بْنِ أَبِي يَزِيدَ، قَالَ قَالَ لِي ابْنُ جُرَيْجٍ يَا حَسَنُ أَخْبَرَنِي عُبَيْدُ اللَّهِ بْنُ أَبِي يَزِيدَ، عَنِ ابْنِ عَبَّاسٍ، قَالَ جَاءَ رَجُلٌ إِلَى النَّبِيِّ صلى الله عليه وسلم فَقَالَ يَا رَسُولَ اللَّهِ إِنِّي رَأَيْتُنِي اللَّيْلَةَ وَأَنَا نَائِمٌ كَأَنِّي أُصَلِّي خَلْفَ شَجَرَةٍ فَسَجَدْتُ فَسَجَدَتِ الشَّجَرَةُ لِسُجُودِي فَسَمِعْتُهَا وَهِيَ تَقُولُ اللَّهُمَّ اكْتُبْ لِي بِهَا عِنْدَكَ أَجْرًا وَضَعْ عَنِّي بِهَا وِزْرًا وَاجْعَلْهَا لِي عِنْدَكَ ذُخْرًا وَتَقَبَّلْهَا مِنِّي كَمَا تَقَبَّلْتَهَا مِنْ عَبْدِكَ دَاوُدَ ‏.‏ قَالَ الْحَسَنُ قَالَ لِي ابْنُ جُرَيْجٍ قَالَ لِي جَدُّكَ قَالَ ابْنُ عَبَّاسٍ فَقَرَأَ النَّبِيُّ صلى الله عليه وسلم سَجْدَةً ثُمَّ سَجَدَ ‏.‏ قَالَ فَقَالَ ابْنُ عَبَّاسٍ فَسَمِعْتُهُ وَهُوَ يَقُولُ مِثْلَ مَا أَخْبَرَهُ الرَّجُلُ عَنْ قَوْلِ الشَّجَرَةِ ‏.‏ قَالَ وَفِي الْبَابِ عَنْ أَبِي سَعِيدٍ ‏.‏ قَالَ أَبُو عِيسَى هَذَا حَدِيثٌ حَسَنٌ غَرِيبٌ مِنْ حَدِيثِ ابْنِ عَبَّاسٍ لاَ نَعْرِفُهُ إِلاَّ مِنْ هَذَا الْوَجْهِ ‏.‏

sunnah.com