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:40:61

It is Allah who made for you the night that you may rest therein and the day giving sight. Indeed, Allah is full of bounty to the people, but most of the people are not grateful.  

God it is Who made for you night that you may rest in it, and day for seeing — the attribution of sight (ibsār) to ‘day’ is figurative, and it is ˹so attributed˺ because one is able to see in it. Surely God is a Lord of bounty to mankind, but most people are not thankful, to God, and so they do not believe.
القرآن:٤٠:٦١

اللَّهُ الَّذِي جَعَلَ لَكُمُ اللَّيْلَ لِتَسْكُنُوا فِيهِ وَالنَّهَارَ مُبْصِرًا ۚ إِنَّ اللَّهَ لَذُو فَضْلٍ عَلَى النَّاسِ وَلَٰكِنَّ أَكْثَرَ النَّاسِ لَا يَشْكُرُونَ  

{الله الذي جعل لكم الليل لتسكنوا فيه والنهار مبصرا} إسناد الإبصار إليه مجازيّ لأنه يبصر فيه {إن الله لذو فضل على الناس ولكن أكثر الناس لا يشكرون} الله فلا يؤمنون.

See similar narrations below:

Collected by Qurʾān
quran:10:67

It is He who made for you the night to rest therein and the day, giving sight. Indeed in that are signs for a people who listen.  

He it is Who made for you the night that you should rest therein, and the day to see: the attribution of sight (ibsār) to ‘the day’ is figurative, since one is able to see during it. Surely in that are signs, indications of His Oneness, exalted be He, for a folk who are able to hear, hearing ˹in such a way so as˺ to reflect and be admonished.
القرآن:١٠:٦٧

هُوَ الَّذِي جَعَلَ لَكُمُ اللَّيْلَ لِتَسْكُنُوا فِيهِ وَالنَّهَارَ مُبْصِرًا ۚ إِنَّ فِي ذَٰلِكَ لَآيَاتٍ لِقَوْمٍ يَسْمَعُونَ  

{هو الذي جعل لكم الليل لتسكنوا فيه والنهار مبصرا} إسناد الإبصار إليه مجاز لأنه يبصر فيه {إن في ذلك لآيات} دلالات على وحدانيته تعالى {لقوم يسمعون} سماع تدبر واتعاظ.