Abu Dharr said, "While I was with the Messenger of Allah ﷺ in the mosque at sunset, he said, 'Abu Dharr, do you know where the sun goes?'I replied, 'Allah and His Messenger know best.'He said, 'It travels until it prostrates before its Lord . Then it seeks permission to return, and permission is granted. Soon it will be as if it is told, Go back where you came from, so it will rise from its place of setting. That is its resting place.'"Muhammad then recited, "And the sun runs toward its resting place" [Ya-Sin 36:38].
حدثنا ابن نمير ومحمد بن عبيد قالا حدثنا الأعمش
قال أبو ذر بينما أنا مع رسول الله ﷺ في المسجد حين وجبت الشمس قال يا أبا ذر أين تذهب الشمس قلت الله ورسوله أعلم قال فإنها تذهب حتى تسجد بين يدي ربها عز وجل ثم تستأذن فيؤذن لها وكأنها قد قيل لها ارجعي من حيث جئت فتطلع من مكانها وذلك مستقر لها قال محمد ثم قرأ {والشمس تجري لمستقر لها}