Hafidh an-Nawawee, may Allah shower blessings on him, said: The chapter on the remembrance of Allah, the most High, while standing, sitting and lying down. That is, a person is required to remember Allah, the Most High in every situation: standing, sitting or lying on his side. Then he cited the saying of Allah, the most High, as evidence:
“Verily! In the creation of the heavens and the earth, and in the alternation of the night and day, there are indeed signs for men of understanding. Those who remember Allah always, and (in their prayers) standing, sitting and lying down on their sides.” (Al-Imran: 190-191).
In the creation of the heavens and the earth; that is, in the nature of the heavens and the nature of the earth due to what they contain of amazing creatures of Allah, the Most High, are signs for people of understanding and intellect, those who understand the wisdom and secrets contained in the signs of Allah. The heaven is spacious and lofty and earth is level and lowly to the creature, and it contains the signs of Allah, the Most High, such as seas, oceans, trees, mountain and others.
As for the alternation of the night and the day, there are signs in their lengthiness and brevity, warmth and coldness, ease and difficult, safety and fear, anguish and delight. If a person were to track the account of the constellations, and the rotation and the alternation of the night and the day, he would appreciate some of the great signs of Allah that will increase him in faith. His saying: “Those who remember Allah standing, sitting and on their sides” [3:191]; this is the point of reference: they remember Allah in every situation, while standing, sitting and lying down on their sides.
Then he, may Allah shower blessings on him, mentioned the hadeeth of Aa'ishah, may Allah have mercy on her, where she said: “The Prophet used to remember Allah at all times” that is, in every situation. He would remember Allah while standing, sitting and lying down. Indeed, the Prophet recommended for a Muslim to remember Allah when cohabiting with his wife. He said: “If anyone intends to have (sexual intercourse) with his wife, he should say: ‘Bismillahi. Allahumma janibna Shaytan wa janib Shaytan ma razaqtana (In the
name of Allah. O Allah, keep us away from Satan and keep Satan away from what you have bestowed upon us).’ And if Allah has ordained a child for them, Satan will never harm him”.
This contains evidence that a person is required to remember Allah frequently at all times. However, the scholars explained that a person should not remember Allah, the Most High, in filthy places such as toilets and similar places out of honour for the remembrance of Allah, the Mighty and Sublime. This is what some of the people of knowledge have stated.
Allah knows best.