Q. A patient hospitalized and wearing diapers…. How about the Mitzvoth of fearing and loving Hashem or feeling you are in His presence in such situations?

A. Chochmas Shlomo (O.H. 85.) considers whether one is permitted to contemplate Hashem’s presence (Shivisi Hashem) when in an unclean situation. He proves from (Talmud Yuma 7b) in regards to the tzits or the golden plate that bore Hashem’s name, that it is acceptable.
However, it would appear from the fact that Mishna Berura (85: 5) writes that it is obvious it is permitted to reflect while in a bathroom over the truth of human frailty and finality, and does not extend this to Hashem’s presence, that this is not allowed (Piskey Teshuvos (ibid.). Nevertheless, many Poiskim are lenient and permit the compliance of all six constant mitzvos (such as believe, love, fear, unity of Hashem etc.) everywhere (Biur Halocho O.H. 1 and Piskey Teshuvos 85: 5) since they are more of a constant feeling than a conscious mental thought.

Horav Shlomo Miller Shlit’a agrees.

Rabbi A. Bartfeld as revised by Horav Shlomo Miller Shlit”a