Umar came in to visit the Messenger of Allah ﷺ while he was lying on a mat that had left marks on his side. Umar said, "Prophet of Allah, if only you would take for yourself a more comfortable bedding than this."He replied, "What have I to do with this world? My example and the example of this world is only like that of a rider who travels on a hot day, takes shade beneath a tree for an hour of the day, then moves on and leaves it behind."
حدثنا عبد الصمد وأبو سعيد وعفان قالوا حدثنا ثابت حدثنا هلال عن عكرمة
أن رسول الله ﷺ دخل عليه عمر وهو على حصير قد أثر في جنبه فقال يا نبي الله لو اتخذت فراشا أوثر من هذا فقال ما لي وللدنيا ما مثلي ومثل الدنيا إلا كراكب سار في يوم صائف فاستظل تحت شجرة ساعة من نهار ثم راح وتركها
Its isnad is sahih. It is in Tarikh Ibn Kathir 6:49–50, quoting this very passage, where he said, "Ahmad alone narrated it." It is also in Majma al-Zawaid 10:321, where he said, "Its narrators are all narrators of the Sahih, except Hilal bin Khabab, who is trustworthy." See also hadith 222 in Musnad Umar.