The hadeeth which was narrated by Imam Ahmad, Ibn Maajah and al-Haakim from ‘Aa’ishah (may Allaah be pleased with her) says: “Any woman who takes off her clothes anywhere but in her husband’s house has torn the veil that was between her and Allaah (i.e., He will expose her).”
A version that was narrated by Ahmad, al-Tabaraani, al-Haakim and al-Bayhaqi from Abu Umaamah (may Allaah be pleased with him) says: “Any woman who takes off her clothes, Allaah will tear His cover away from her (i.e., expose her).”
What the Prophet (peace and blessings of Allaah be upon him) meant was to stop women treating as insignificant the matter of removing their clothes anywhere but in their husband’s houses in such a manner that their ‘awrah can be seen and that they may be accused of intending to commit immoral actions and the like. As for taking off their clothes in a safe place, such as in her family’s house or her mahram’s house, to change her clothes and the like, or to relax etc and for other permissible purposes that are far removed from fitnah, there is nothing wrong with that.
And Allaah is the Source of strength.