Jabir bin Abdullah reported,

He used to relate that the Messenger of Allah ﷺ was carrying stones with them for the Kaaba while wearing his lower garment. His uncle Abbas said to him, "Nephew, why don't you untie your garment and place it on your shoulders to cushion the stones?"So he untied it and placed it on his shoulders, but he fell down unconscious. After that, he was never seen naked ﷺ.

Bukhari 364

Sahih

حدثنا مطر بن الفضل قال حدثنا روح قال حدثنا زكرياء بن إسحاق حدثنا عمرو بن دينار قال سمعت

جابر بن عبد الله

يحدث أن رسول الله ﷺ كان ينقل معهم الحجارة للكعبة وعليه إزاره فقال له العباس عمه يا ابن أخي لو حللت إزارك فجعلت على منكبيك دون الحجارة قال فحله فجعله على منكبيه فسقط مغشيا عليه فما رئي بعد ذلك عريانا ﷺ

البخاري 364صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Prayer
Chapter
Dislike of being unclothed in prayer and otherwise
Numbering
Darussalam 364
Bukhari 364