Q. Is a man allowed to wear any clothing (a night gown) of a woman, when no one else is present or it is cold and he doesn’t have anything else to wear at night?
A. It is biblically forbidden for a man to wear women’s clothes or for a woman to wear men’s garments, as specified in the negative commandment: (Devarim 22: 5) A man's attire shall not be on a woman, nor may a man wear a woman's garment, because whoever does these [things] is an abomination to Hashem, your G-d.”. The Torah refers to this kind of conduct as an abomination since it can easily lead to promiscuity and immorality This prohibition, known as “Lo yilbash,” applies even if one cannot be seen by others and even in the privacy of one’s home. The prohibition is mentioned and explained in Talmud (Nazir 59a), Rambam (Avoda Zara 12: 10), Sefer Hamitzvos lo saseh 39 and Moreh Nevuchim 3:37, Chinuch 542 and Tur - Shulchan Aruch (Y.D. 182.)
Rabbi A. Bartfeld as revised by Horav Shlomo Miller Shlit”a