On the permission to lie on one's back and put one leg across the other when one's private parts are not exposed

Riyad as-Salihin (The Meadows of the Righteous)

by Imam Nawawi

128. Chapter: On the permission to lie on one's back and put one leg across the other when one's private parts are not exposed, and the permission to sit cross-legged and sitting with one's legs drawn up

820. 'Abdullah ibn Zayd reported that he saw the Messenger of Allah, may Allah bless him and grant him peace, lying on his back in the mosque with one foot on top of the other." [Agreed upon]

821. Jabir ibn Samura said, "The Prophet, may Allah bless him and grant him peace, used to pray Fajr and then sit cross-legged where he was until the sun had become white." [Abu Dawud]

822. Ibn 'Umar said, "I saw the Messenger of Allah, may Allah bless him and grant him peace, in the courtyard of the Ka'ba with his arms around his knees like this," and he demonstrated the position. [al-Bukhari]

823. Qayla bint Makhrama said, "I saw the Prophet, may Allah bless him and grant him peace, while he was sitting cross-legged and when I saw the Messenger of Allah, may Allah bless him and grant him peace, sitting so humbly, I trembled out of fear." [Abu Dawud and at-Tirmidhi]

824. Ash-Sharid ibn Suwayd said, "The Messenger of Allah, may Allah bless him and grant him peace, passed by me when I was sitting like this - and I put my left hand behind my back and put my weight on the fleshy part under the thumb. He said, 'Do you sit in the sitting position of those with anger on them?'" [Abu Dawud]