Scholars have differed over whether a man must cover his awrah when alone, but they have not differed over the necessity of clothing during prayer. By scholarly consensus, a person may not pray naked when able to clothe himself. For this reason, Ahmad and others permitted those without clothing to pray seated, with their imam in their midst, unlike the situation outside prayer. This prohibition is not based on whether others can see them.
In the hadith narrated by Bahz ibn Hakīm, from his father, from his grandfather, the latter said:
“I asked, ‘O Messenger of Allah, what if one of us is alone?’ He replied, ‘Allah is more deserving of your modesty than people are.’”
If this applies outside prayer, then Allah is all the more deserving of one's modesty during prayer. One should therefore dress becomingly for intimate discourse with Him, glorified is He.
For this reason, when Ibn Umar saw his servant Nāfiʿ praying bareheaded, he asked him, “Tell me, if you were going out among people, would you go out like this?” He replied, “No.” Ibn Umar said, “Allah is more deserving that you dress becomingly for Him.”
Likewise, in an authentic hadith, when the Prophet—may Allah bless him and grant him peace—was told, “A man likes his clothes and shoes to look good,” he replied:
“Allah is beautiful and loves beauty.”
This is akin to the command that the worshipper observe ritual purity and cleanliness and use perfume. The Prophet—may Allah bless him and grant him peace—commanded that places of prayer be established in homes and kept clean and perfumed. Accordingly, a person should cover more fully during prayer than a man must before another man or a woman before another woman. For this reason, a woman is commanded to cover her head during prayer. As for her face