Ibn Abbas reported: A man came to the Prophet, peace and blessings be upon him, and he said, “O Messenger of Allah, I saw while I was sleeping night as if I were praying behind a tree. I prostrated and the tree prostrated along with me. I heard it saying: O Allah, write a reward for me with You, remove my burdens, store it for me with You, and accept it from me as You accepted it from your servant David.” Then, the Prophet recited a verse of prostration and prostrated.
Source: Sunan al-Tirmidhī 3424
Grade: Sahih (authentic) according to Ahmad Shakir
عَنِ ابْنِ عَبَّاسٍ قَالَ جَاءَ رَجُلٌ إِلَى النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ فَقَالَ يَا رَسُولَ اللهِ رَأَيْتُنِي اللَّيْلَةَ وَأَنَا نَائِمٌ كَأَنِّي كُنْتُ أُصَلِّي خَلْفَ شَجَرَةٍ فَسَجَدْتُ فَسَجَدَتِ الشَّجَرَةُ لِسُجُودِي فَسَمِعْتُهَا وَهِيَ تَقُولُ اللَّهُمَّ اكْتُبْ لِي بِهَا عِنْدَكَ أَجْرًا وَضَعْ عَنِّي بِهَا وِزْرًا وَاجْعَلْهَا لِي عِنْدَكَ ذُخْرًا وَتَقَبَّلْهَا مِنِّي كَمَا تَقَبَّلْتَهَا مِنْ عَبْدِكَ دَاوُدَ فَقَرَأَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ سَجْدَةً ثُمَّ سَجَدَ
3424 سنن الترمذي أبواب الدعوات باب ما يقول في سجود القرآن
2/473 المحدث أحمد شاكر خلاصة حكم المحدث صحيح في شرح سنن الترمذي