[Machine] I was with the Messenger of Allah ﷺ in the mosque when the sun set. He said, "O Abu Dharr, do you know where the sun goes?" I said, "Allah and His Messenger know best." He said, "Indeed, it goes until it prostrates beneath the Throne of its Lord, then seeks permission to return, and permission is granted to it. It is as if it has been said to it, 'Go back to where you came from,' and so it returns to its rising place. That is its resting place." Then he recited, "And the sun runs [on course] toward its stopping point." (Surah Ya-Sin 36:38)
كُنْتُ مَعَ رَسُولِ اللهِ ﷺ فِي الْمَسْجِدِ حِينَ وَجَبَتِ الشَّمْسُ فَقَالَ يَا أَبَا ذَرٍّ تَدْرِي أَيْنَ تَذْهَبُ الشَّمْسُ؟ قُلْتُ اللهُ وَرَسُولُهُ أَعْلَمُ قَالَ فَإِنَّهَا تَذْهَبُ حَتَّى تَسْجُدَ بَيْنَ يَدَيْ رَبِّهَا فَتَسْتَأْذِنَ فِي الرُّجُوعِ فَيُؤْذَنَ لَهَا وَكَأَنَّهَا قَدْ قِيلَ لَهَا ارْجِعِي مِنْ حَيْثُ جِئْتِ فَتَرْجِعَ إِلَى مَطْلَعِهَا فَذَلِكَ مُسْتَقَرُّهَا ثُمَّ قَرَأَ {وَالشَّمْسُ تَجْرِي لِمُسْتَقَرٍّ لَهَا} [يس 38]