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:25:62

And it is He who has made the night and the day in succession for whoever desires to remember or desires gratitude.  

And He it is Who made the night and day ˹to appear˺ in succession, that is, one succeeding the other, for him who desires to remember (read yadhdhakkara or yadhkura, as before ˹Q. 25:50˺) — so that if he misses ˹the opportunity to do˺ some good during the one, he can do it during the other; or desires to be thankful, for the graces of his Lord to him during both ˹of these periods˺.
القرآن:٢٥:٦٢

وَهُوَ الَّذِي جَعَلَ اللَّيْلَ وَالنَّهَارَ خِلْفَةً لِمَنْ أَرَادَ أَنْ يَذَّكَّرَ أَوْ أَرَادَ شُكُورًا  

{وهو الذي جعل الليل والنهار خلفة} أي يخلف كل منهما الآخر {لمن أراد أن يذَّكَّر} بالتشديد والتخفيف كما تقدم: ما فاته في أحدهما من خير فيفعله في الآخر {أو أراد شُكور} أي شكرا لنعمة ربه عليه فيهما.