The Prophet ﷺ said one day, "Do you know where this sun goes?"They said, "Allah and His Messenger know best."He said, "It runs until it reaches its resting place beneath the Throne, then it falls down in prostration. It remains so until it is told, 'Rise, return from where you came.' So it returns and rises in the morning from its rising place. Then it runs until it reaches its resting place beneath the Throne, then it falls down in prostration, and it remains so until it is told, 'Rise, return from where you came.' So it returns and rises in the morning from its rising place. Then it runs, and the people notice nothing strange about it, until it reaches that resting place of its own beneath the Throne, and it is told, 'Rise, rise in the morning from your place of setting.' So it rises in the morning from its place of setting."Then the Messenger of Allah ﷺ said, "Do you know when that will be? That will be when "no soul will benefit from its faith if it had not believed before, or earned good through its faith. Say, wait. We too are waiting" [Anam 6:158]."
أن النبي ﷺ قال يوما: أتدرون أين تذهب هذه الشمس؟ قالوا: الله ورسوله أعلم. قال: إن هذه تجري حتى تنتهي إلى مستقرها تحت العرش، فتخر ساجدة، فلا تزال كذلك حتى يقال لها: ارتفعي ارجعي من حيث جئت، فترجع، فتصبح طالعة من مطلعها، ثم تجري حتى تنتهي إلى مستقرها تحت العرش، فتخر ساجدة، ولا تزال كذلك حتى يقال لها: ارتفعي، ارجعي من حيث جئت، فترجع، فتصبح طالعة من مطلعها، ثم تجرى لا يستنكر الناس منها شيئا حتى تنتهي إلى مستقرها ذاك تحت العرش، فيقال لها: ارتفعي، أصبحي طالعة من مغربك، فتصبح طالعة من مغربها. فقال رسول الله ﷺ: أتدرون متى ذاكم؟ ذاك حين {لا ينفع نفسا إيمنها لم تكن امنت من قبل أو كسبت في إيمنها خيرا قل انتظروا إنا منتظرون}.
Bukhari narrated it in the Book of the Beginning of Creation (3199), and Muslim in the Book of Faith (159:250), and the wording given here is his, both narrating it through Ibrahim bin Yazid Taymi, from his father, from Abu Dharr, who related it. This is the wording of Muslim, while Bukhari narrated it in abridged form.In another wording from Muslim, "It goes and asks permission to perform sujud, and permission is granted to it, as if it were told, 'Return from where you came,' so it rises from its place of setting."He said, then he recited, according to the recitation of Abdullah, "and that is its resting place" [Yasin 36:38]. This verse is one of the verses of sajdah, and it has come in the Sahih.