Ubadah bin Tamim narrated from his uncle, Abdullah bin Zayd bin Asim Mazni (may Allah be pleased with him), that he saw the Messenger of Allah (peace and blessings be upon him) lying on his back in the mosque with one of his legs placed over the other.
Hadith Referenceسنن دارمي / من كتاب الاستئذان / 2691
Hadith Gradingتحقیق (حسین سلیم أسد الدارانی):إسناده صحيح والحديث متفق عليه، [مكتبه الشامله نمبر: 2698]
Hadith Takhrijاس روایت کی سند صحیح اور حدیث بھی متفق علیہ ہے۔ دیکھئے: [بخاري 475] ، [مسلم 2100] ، [أبوداؤد 4866] ، [ترمذي 2765] ، [نسائي 720] ، [ابن حبان 5552] ، [الحميدي 418]
Brief Explanation
(Commentary on Hadith 2690)
From this hadith, it is established that in times of need, lying down in the mosque, lying on one’s back, and lying with one leg placed over the other are permissible.
In some narrations, there is also a prohibition against lying on one’s back with one leg placed over the other, but in this hadith, it is established that the Messenger of Allah (sallallahu alayhi wa sallam) lay in this manner.
It is also established that Sayyiduna Umar and Sayyiduna Uthman (radi Allahu anhuma) lay in this way, therefore it will be said that the prohibition applies in the case where there is a risk of the private parts becoming uncovered. For the person who takes full care to cover the ‘awrah (private parts), there is no objection to lying in this manner.