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:7:4

And how many cities have We destroyed, and Our punishment came to them at night or while they were sleeping at noon.  

How many (kam is predicative and is the direct object ˹of the main verb, ahlaknāhā, ‘We have destroyed’˺) a city, meaning its inhabitants, have We destroyed, have We willed its destruction! So Our might, Our chastisement, came upon it at night or while they slept at noon (qā’ilūn: al-qaylūla is a rest taken halfway during the day, even if it does not involve sleep), in other words, sometimes it came upon it at night, and sometimes it came during the day.
القرآن:٧:٤

وَكَمْ مِنْ قَرْيَةٍ أَهْلَكْنَاهَا فَجَاءَهَا بَأْسُنَا بَيَاتًا أَوْ هُمْ قَائِلُونَ  

{وكم} خبرية مفعول {من قرية} أريد أهلها {أهلكناها} أردنا إهلاكها {فجاءها بأسنا} عذابا {بياتا} ليلا {أو هم قائلون} نائمون بالظهيرة والقيلولة استراحة نصف النهار وإن لم يكن معها نوم أي مرة جاءها ليلا ومرَّة جاءها نهارا.