Someone said, "People say that when you sit to relieve yourself, you should not face the qiblah or Bayt al-Maqdis."Abdullah bin Umar replied, "One day I climbed onto the roof of one of our houses and saw the Messenger of Allah ﷺ sitting on two bricks, facing Bayt al-Maqdis as he relieved himself."He then asked, "Perhaps you are one of those who pray on their backsides?"I answered, "By Allah, I do not know!"Malik explained, "He means one who prays without lifting himself from the ground, prostrating while pressed flat against it."
إن ناسا يقولون: إذا قعدت على حاجتك فلا تستقبل القبلة ولا بيت المقدس، فقال عبد الله بن عمر: لقد ارتقيت يوما على ظهر بيت لنا، فرأيت رسول الله ﷺ على لبنتين مستقبلا بيت المقدس لحاجته، وقال: لعلك من الذين يصلون على أوراكهم؟ فقلت: لا أدري والله! قال مالك: يعني يصلي ولا يرتفع عن الأرض؛ يسجد وهو لاصق بالأرض.
Malik narrated it in "The Qibla" (3) from Yahya bin Saeed, from Muhammad bin Yahya bin Habban, from his uncle Wasi bin Habban, from Abdullah bin Umar, and he related the hadith. Bukhari narrated it in "Wudu" (145) from Abdullah bin Yusuf, from Malik, with the same wording. Muslim narrated it in "Purification" (266) from Abdullah bin Maslama, who said, Sulayman bin Bilal told us, from Yahya bin Saeed, from Muhammad bin Yahya, from his uncle Wasi bin Habban, who said, "I was praying in the masjid while Abdullah bin Umar had his back resting against the qibla. When I finished my prayer, I turned toward him from my side, and Abdullah said, 'People say that when someone sits to relieve himself, he should not face the qibla or Bayt al-Maqdis. But I climbed onto the roof of a house and saw the Messenger of Allah ﷺ sitting on two bricks, facing Bayt al-Maqdis, relieving himself.'"In another version reported by both Bukhari (148) and Muslim, from Ubaydullah bin Umar, from Muhammad bin Yahya bin Habban, with the same chain, it states, "I climbed onto the roof of Hafsa's house for some need of mine, and I saw the Messenger of Allah ﷺ relieving himself with his back to the qibla, facing Syria."Ubaydullah bin Umar is the son of Hafs bin Asim bin Umar bin Khattab, a minor member of the generation following the companions, one of the jurists among the people of Madinah.As for his statement, "Perhaps you are among those who pray resting on their haunches," it means someone who presses his stomach against his thighs when performing sujud, which is contrary to the prescribed form of sujud, namely keeping the limbs raised and the elbows away from the sides. See what the Hafiz mentioned regarding how this sentence relates to what precedes it in the hadith.The hadith also indicates that women going out into the open to relieve themselves did not continue as a practice, and that latrines were later established within houses.