Ruling on turning one’s back towards the qiblah for one who is waiting for the prayer in the mosque
Question

What is the ruling on turning one’s back towards the qiblah for one who is waiting for the prayer? Because some people lean on the front wall of the mosque that is in the direction of the qiblah, so their backs are facing towards the qiblah.
Praise be to Allah.It is disliked to turn one’s back towards the qiblah whilst waiting for the prayer if one has no excuse for doing that. What is prescribed is to sit facing towards the qiblah. This is the habit of people in their mosques in the past and in modern times.
At-Tabarani narrated in al-Awsat (2354) that Abu Hurayrah (may Allah be pleased with him) said: The Messenger of Allah (blessings and peace of Allah be upon him) said: “Everything has an ideal, and that the ideal when sitting is facing towards the qiblah.”
Classed as hasan by al-Mundhiri in at-Targhib wa’t-Tarhib, 4663; and by al-Albani in Sahih at-Targhib, 3085.
Ibn Muflih (may Allah have mercy on him) said:
It is Sunnah to occupy oneself in the mosque with prayer, reading Qur’an, and reciting dhikr. One should sit facing towards the qiblah, and it is makruh to lean with one’s back towards the qiblah. Ahmad said: This is disliked. Al-Qadi clearly stated that it is disliked. Ibrahim said: They regarded it as disliked to lean [with one’s back] towards the qiblah before Fajr prayer. It was narrated by Abu Bakr an-Najjad.
End quote from al-Adab ash-Shar`iyyah, 4/88.
And Allah knows best.