Wa `alaykum as-salamu wa rahmatullahi wa rarakatuh.
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
In this fatwa:
1- Naturally, one takes off clothes when taking a bath, and there is nothing wrong with this. This is clear as one will be alone while bathing or maybe with one’s spouse. In either case, there is nothing wrong in this.
2- However, one should not remain naked when there is no need.
Answering your question, Sheikh Muhammad Saleh Al-Munajjid, a prominent Saudi scholar and lecturer, states:
In his Sahih, Imam Al-Bukhari narrated that Abu Hurairah (may Allah be pleased with him) said:
The Messenger of Allah (peace and blessings be upon him) said: “Prophet Moses (peace be upon him) was a very shy and modest man, and none of his skin was ever seen because he was so modest.
So some of the Children of Israel annoyed him by saying, ‘He is only being so modest because he has some fault in his skin, such as leprosy, scrotal hernia, or the like.’
Allah wanted to demonstrate that he was free of what they were saying about him.
One day Moses went away by himself, put his garment on a rock, and washed himself. When he had finished, he went to pick up his garment and the rock ran away with it.
Moses picked up his stick and ran after the rock, saying, ‘My garment, O rock! My garment, O rock!’ Then he reached a group of the Children of Israel, who saw him naked and that he was the best that Allah had created and the most free of the faults that they had spoken of.
Then the rock stopped, so Moses took his garment and struck the rock with his stick.
By Allah, there were marks left on the rock by his stick, three or four or five.
This is what Allah told us about in the verse that reads, ‘O you who believe! Be not like those who annoyed Moses, but Allah cleared him of that which they alleged, and he was honorable before Allah’ (Al-Ahzab 33:69)
Scholars quoted this hadith as evidence that it is permissible to be naked when one is alone, especially if that is for a reason such as taking a bath.
Most of the scholars regarded this as being permissible, as Al-Hafizh said in Al-Fath.
Al-Bukhari gave this chapter the title “Chapter on one who bathes naked when he is alone, although whoever covers himself, covering is preferable.”
The fact that covering oneself is preferable is taken from the hadith which was narrated by the compilers of Sunan and classed as sound by At-Tirmidhi and as authentic by Al-Hakim, from Muawiyah ibn Haydah, who said:
I said, “O Messenger of Allah, when should we cover our awrah (parts of the body that need to be covered in front of others) and when may we uncover it?”
He said, “Protect (cover) your awrah from everyone except your wife and those whom your right hand possesses.”
I said, “O Messenger of Allah, what about when one of us is alone?” He said, “Allah is more deserving than the people that you should be modest before Him.”
Allah Almighty knows best.