the Fatwa Department Research Committee - chaired by Sheikh `Abd al-Wahhâb al-Turayrî
It was related by al-Bukhârî and Muslim that `Abd Allah b. Zayd b. `Asim saw the Prophet (peace be upon him) laying in the mosque placing one leg over the other.
Ibn Hajr commented on this hadith in Fath al-Bârî (1/563) by saying:
Al-Khattâbî said that the prohibition mentioned for crossing the legs is either abrogated or the reason for its prohibition is only to avoid exposing the person’s private parts. Otherwise, it would be permissible to sit in such a position.
I concur with the second option mentioned by al-Khattâbî, since the claim that the prohibition has been abrogated should not be entertained merely as an unfounded possibility.
This was also confirmed by al-Bayhaqî and al-Baghawî. It seems that this act by the Prophet (peace be upon him) is to show that it is permissible. It seems that it also took place at a rest time because it is known that the Prophet (peace be upon him) used to sit respectfully among people.
Al-Khattâbî said: “This would also show us that it is permissible to sit in any comfortable position in the mosque. Al-Dâwûdî said: ‘It also shows that the reward for the one who stays in the mosque would also apply for the one who lays down in the mosque'.”
And Allah knows best.
Source: Islam Today