A man came to the Prophet ﷺ and said, "Messenger of Allah, last night in my sleep I saw myself praying behind a tree. When I prostrated, the tree prostrated along with my prostration, and I heard it saying, 'O Allah, record for me by it a reward with You, remove from me by it a burden, store it up for me with You, and accept it from me as You accepted it from Your servant Dawud.'"Ibn Jurayj said, my grandfather told me that Ibn Abbas said, the Prophet ﷺ then recited a verse of prostration and prostrated.Ibn Abbas said, I heard him saying, while in prostration, the very same words the man had reported the tree said.
حدثنا قتيبة حدثنا محمد بن يزيد بن خنيس حدثنا الحسن بن محمد بن عبيد الله بن أبي يزيد قال قال لي ابن جريج أخبرني عبيد الله بن أبي يزيد
جاء رجل إلى النبي ﷺ فقال يا رسول الله رأيتني الليلة وأنا نائم كأني كنت أصلي خلف شجرة فسجدت فسجدت الشجرة لسجودي وسمعتها وهي تقول اللهم اكتب لي بها عندك أجرا وضع عني بها وزرا واجعلها لي عندك ذخرا وتقبلها مني كما تقبلتها من عبدك داود قال ابن جريج قال لي جدك قال ابن عباس فقرأ النبي ﷺ سجدة ثم سجد قال ابن عباس فسمعته وهو يقول مثل ما أخبره الرجل عن قول الشجرة
[Its chain is hasan] mentioned previously: 579. Ibn Majah also narrated it in the Book of Establishing the Prayers, Chapter on the Sujud of the Quran, hadith no. 1053, from the hadith of Muhammad bin Yazid bin Khunays, through this same route. Ibn Khuzayma graded it sahih (1/282, hadith no. 562), as did Ibn Hibban (hadith no. 691), Hakim (1/219, 220), Dhahabi, and others.And the hadith of Abu Saeed [mentioned previously: 579].