Language:
كتاب الصلاة
8  
Prayers (Salat)
(8)
Chapter: It is disliked to the naked during As-Salat (the prayers)
(8)
باب كَرَاهِيَةِ التَّعَرِّي فِي الصَّلاَةِ وَغَيْرِهَا
Sahih al-Bukhari 364

Narrated Jabir bin `Abdullah:

While Allah's Messenger (ﷺ) was carrying stones (along) with the people of Mecca for (the building of) the Ka`ba wearing an Izar (waist-sheet cover), his uncle Al-`Abbas said to him, "O my nephew! (It would be better) if you take off your Izar and put it over your shoulders underneath the stones." So he took off his Izar and put it over his shoulders, but he fell unconscious and since then he had never been seen naked.

حَدَّثَنَا مَطَرُ بْنُ الْفَضْلِ، قَالَ حَدَّثَنَا رَوْحٌ، قَالَ حَدَّثَنَا زَكَرِيَّاءُ بْنُ إِسْحَاقَ، حَدَّثَنَا عَمْرُو بْنُ دِينَارٍ، قَالَ سَمِعْتُ جَابِرَ بْنَ عَبْدِ اللَّهِ، يُحَدِّثُ أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم كَانَ يَنْقُلُ مَعَهُمُ الْحِجَارَةَ لِلْكَعْبَةِ وَعَلَيْهِ إِزَارُهُ‏.‏ فَقَالَ لَهُ الْعَبَّاسُ عَمُّهُ يَا ابْنَ أَخِي، لَوْ حَلَلْتَ إِزَارَكَ فَجَعَلْتَ عَلَى مَنْكِبَيْكَ دُونَ الْحِجَارَةِ‏.‏ قَالَ فَحَلَّهُ فَجَعَلَهُ عَلَى مَنْكِبَيْهِ، فَسَقَطَ مَغْشِيًّا عَلَيْهِ، فَمَا رُئِيَ بَعْدَ ذَلِكَ عُرْيَانًا صلى الله عليه وسلم‏.‏
Reference : Sahih al-Bukhari 364
In-book reference : Book 8, Hadith 16
USC-MSA web (English) reference : Vol. 1, Book 8, Hadith 360
  (deprecated numbering scheme)