Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:24:44

Allah alternates the night and the day. Indeed in that is a lesson for those who have vision.  

God alternates the night and the day, that is, He brings one in place of the other. Surely in that, alternation, there is a lesson, an indication, for those who see, those possessing insight, ˹an indication˺ of God’s power, exalted be He.
القرآن:٢٤:٤٤

يُقَلِّبُ اللَّهُ اللَّيْلَ وَالنَّهَارَ ۚ إِنَّ فِي ذَٰلِكَ لَعِبْرَةً لِأُولِي الْأَبْصَارِ  

{يقلب الله الليل والنهار} أي يأتي بكل منهما بدل الآخر {إن في ذلك} التقليب {لعبرة} دلالة {لأولي الأبصار} لأصحاب البصائر على قدرة الله تعالى.