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:3:191

Who remember Allah while standing or sitting or ˹lying˺ on their sides and give thought to the creation of the heavens and the earth, ˹saying˺, "Our Lord, You did not create this aimlessly; exalted are You ˹above such a thing˺; then protect us from the punishment of the Fire.  

Those who (alladhīna, an adjectival qualification of the preceding ˹li-ūlī l-albāb, ‘for people of pith’˺, or a substitution for it) remember God, standing and sitting and on their sides, reclining, that is to say, in all states: ˹it is reported˺ from Ibn ‘Abbās that they perform prayer in these ways, ˹each˺ according to ˹his own˺ capacity; and reflect upon the creation of the heavens and the earth, to deduce therefrom the power of their Creator, saying: ‘Our Lord, You have not created this, creation that we see, in vain (bātilan, a circumstantial qualifier), frivolously, but as a proof of the totality of Your power. Glory be to You!, exalted above any frivolity. So guard us against the chastisement of the Fire.
القرآن:٣:١٩١

الَّذِينَ يَذْكُرُونَ اللَّهَ قِيَامًا وَقُعُودًا وَعَلَىٰ جُنُوبِهِمْ وَيَتَفَكَّرُونَ فِي خَلْقِ السَّمَاوَاتِ وَالْأَرْضِ رَبَّنَا مَا خَلَقْتَ هَٰذَا بَاطِلًا سُبْحَانَكَ فَقِنَا عَذَابَ النَّارِ  

{الذين} نعت لما قبله أو بدل {يذكرون الله قياما وقعودا وعلى جنوبهم} مضطجعين أي في كل حال، وعن ابن عباس يصلون كذلك حسب الطاقة {ويتفكرون في خلق السماوات والأرض} ليستدلوا به على قدرة صانعهما يقولون {ربنا ما خلقت هذا} الخلق الذي نراه {باطلا} حال، عبثا بل دليلا على كمال قدرتك {سبحانك} تنزيها لك عن العبث {فقِنا عذاب النار}.