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:28:72

Say, "Have you considered: if Allah should make for you the day continuous until the Day of Resurrection, what deity other than Allah could bring you a night in which you may rest? Then will you not see?"  

Say, to them: ‘Have you considered, if God were to make the day everlasting over you until the Day of Resurrection, what god other than God, as you ˹are wont to˺ claim, could bring you night wherein you rest?, from ˹any˺ weariness. Will you not then see?, the error you are upon when you ascribe partners ˹to God˺, and so repent of it.
القرآن:٢٨:٧٢

قُلْ أَرَأَيْتُمْ إِنْ جَعَلَ اللَّهُ عَلَيْكُمُ النَّهَارَ سَرْمَدًا إِلَىٰ يَوْمِ الْقِيَامَةِ مَنْ إِلَٰهٌ غَيْرُ اللَّهِ يَأْتِيكُمْ بِلَيْلٍ تَسْكُنُونَ فِيهِ ۖ أَفَلَا تُبْصِرُونَ  

{قل} لهم {أرأيتم إن جعل الله عليكم النهار سرمداً إلى يوم القيامة من إله غير الله} بزعمكم {يأتيكم بليل تسكنون} تستريحون {فيه} من التعب {أفلا تبصرون} ما أنتم عليه من الخطأ في الإشراك فترجعون عنه.

See similar narrations below:

Collected by Qurʾān
quran:28:71

Say, "Have you considered: if Allah should make for you the night continuous until the Day of Resurrection, what deity other than Allah could bring you light? Then will you not hear?"  

Say, to the people of Mecca: ‘Have you considered, in other words, inform Me: if God were to make the night everlasting over you until the Day of Resurrection, what god other than God, as you ˹are wont to˺ claim, could bring you light?, daylight ˹hours˺ during which you could earn ˹a living˺. Will you not then listen?’, to this in a way so as to understand it and so repent of your idolatry.
القرآن:٢٨:٧١

قُلْ أَرَأَيْتُمْ إِنْ جَعَلَ اللَّهُ عَلَيْكُمُ اللَّيْلَ سَرْمَدًا إِلَىٰ يَوْمِ الْقِيَامَةِ مَنْ إِلَٰهٌ غَيْرُ اللَّهِ يَأْتِيكُمْ بِضِيَاءٍ ۖ أَفَلَا تَسْمَعُونَ  

{قل} لأهل مكة {أرأيتم} أي أخبروني {إن جعل الله عليكم الليل سرمداً} دائماً {إلى يوم القيامة من إله غير الله} بزعمكم {يأتيكم بضياءٍ} نهار تطلبون فيه المعيشة {أفلا تسمعون} ذلك سماع تفهم فترجعون عن الإشراك.