1. When undressing, even if you are alone, you should avoid being completely naked. You should keep on the upper garment when removing the lower garment. After wearing the clean lower garment, you may remove the upper garment.
Hazrat Bahz bin Hakeem relates from his father, who relates from his grandfather (radhiyallahu ‘anhu): On one occasion, I asked, “O Rasulullah (sallallahu ‘alaihi wasallam), with regards to our private parts, what are the laws regarding our exposing or concealing them?” Rasulullah (sallallahu ‘alaihi wasallam) replied, “Safeguard your private parts and do not expose them except before your wife or your slave women.” I then asked, “O Rasulullah (sallallahu ‘alaihi wasallam), what is the law in the case where many people are living together?” Rasulullah (sallallahu ‘alaihi wasallam) replied, “Ensure that you do not expose your private parts before anyone.” I then asked, “O Rasulullah (sallallahu ‘alaihi wasallam), what is the law in the case where a person is alone (can he undress and become completely naked)?” Rasulullah (sallallahu ‘alaihi wasallam) replied, “Allah Ta‘ala is more worthy than the people that you show shame and modesty before Him.”