In the Name of Allah, Most Gracious, Most Merciful
In general, it is either recommended or wajib to cover one’s awra even when alone, except when there is an inevitable need. Ibn Abidin deemed the latter opinion, though the former is valid, too, as many chose it. It goes back to the Prophet’s words (Allah bless him & give him peace), “Allah is more deserving of one’s shyness.”
Imam Zayn Ibn al-Nujaym said in his al-Bahr al-Ra’iq:
Know that there is scholarly consensus (ijma`) that it is obligatory to cover one’s nakedness (`awra) in front of others… And when alone, there is difference of opinion [as to whether it is obligatory], but the correct opinion is that it is necessary (wajib), unless the uncovering was for a valid reason, as mentioned in Sharh al-Munya. [al-Bahr al-Ra’iq, 1: 283)
Imam al-Haskafi said in Durr al-Mukhtar:
(And to cover one’s nakedness), this is a general obligation, even when alone according to the correct opinion, unless it is for a valid reason.
Ibn Abidin explained in his Radd al-Muhtar:
(Even when alone) That is: Outside of prayer, it is obligatory to cover one’s nakedness in front of others by scholarly consensus, and even when alone according to the correct opinion…
Now, the apparent meaning of covering one’s nakedness when alone outside of prayer [in this context] is that which is between the navel and knee, such that even women do not have to cover other than that [when alone] even if it is of their nakedness (awrah) [in front of others]…
(According to the correct opinion) For Allah Most High, even though He sees the covered just as He sees the naked, sees the one with their nakedness uncovered leaving proper manners and sees the covered exhibiting proper manners. These proper manners [here] are obligatory [f: because of the primary texts about them] whenever there is ability to exercise them.
(Unless it is for a valid reason) Such as using the toilet or cleaning oneself. In the Quniya, several opinions are mentioned about showering naked: that it is disliked; that it is excused, insha’Allah; that there is nothing wrong with it [i.e. but it is better not to]; that it is allowed for a small amount of time; that it is allowed in a small washroom… [Radd al-Muhtar, 1: 404-405)
The Prophet (Allah bless him and give him peace) instructed all men and women that, “Modesty is from faith,” and that, “Modesty brings only good.”