(4) The Book of the Etiquette of Sleeping, Lying and Sitting etc
كتاب آداب النوم
(128) Chapter: Manners of Lying down on one's back and placing one leg upon the Other
(128) - باب جواز الاستلقاء على القفا ووضع إحدى الرجلين على الأخرى إذا لم يخف انكشاف العورة وجواز القعود متربعاً ومحتبياً
Riyad as-Salihin 821 
Ibn 'Umar (May Allah be pleased with them) reported:
I saw Messenger of Allah (ﷺ) sitting in the compound of the Holy Ka'bah, with the thighs against the stomach and arms around his legs.

[Al- Bukhari].
وعن ابن عمر رضى الله عنهما قال‏:‏ رأيت رسول الله صلى الله عليه وسلم بفناء الكعبة محتبياً بيديه هكذا‏.‏ ووصف بيديه الاحتباء، وهو القرفصاء‏.‏ ‏‏(‏‏(‏رواه البخاري‏)‏‏)‏.‏
Reference : Riyad as-Salihin 821
In-book reference : Book 4, Hadith 9