Al-Imām al-Bukhārī - upon whom be mercy - narrates: ‘Abdullāh ibn Yūsuf related to us; he said: Imām Mālik informed us, from Busr ibn Sa’īd, from Muḥammad ibn Yaḥyā ibn Ḥibbān, from his paternal uncle Wāsi’ ibn Ḥibbān,
from ‘Abdullāh ibn ‘Umar (may Allāh Almighty be content with both of them), who said: People say: “When you sit to relieve yourselves, do not face the Qiblah, nor face Bayt al-Maqdis.” Ibn ‘Umar - may Allāh Almighty be content with both of them - said: “One day I climbed onto the roof of my house, and I saw the Messenger of Allāh ﷺ, seated upon two bricks, relieving himself, with his noble face turned towards Bayt al-Maqdis.” Then Ibn ‘Umar said to Wāsi’ ibn Ḥibbān: “Perhaps you are among those who pray while keeping their hips lowered?” Wāsi’ ibn Ḥibbān said: “By Allāh! I did not understand what you meant.” Imām Mālik - upon whom be mercy - explained the statement of Ibn ‘Umar, saying: His meaning was: one who prays in such a manner that he does not raise himself from the ground, remaining pressed closely to it in prostration. (This manner of prayer is contrary to the Sunnah for men; rather, this posture is characteristic of women’s prayer.) Thus, Ibn ‘Umar’s intent was: Just as you pray in a manner contrary to the Sunnah, perhaps you also relieve yourself in a manner contrary to the Sunnah — namely, by avoiding facing the Qiblah even when within a built structure.
حَدَّثَنَا عَبْدُ اللهِ بْنُ يُوسُفَ قَالَ: أَخْبَرَنَا مَالِكٌ، عَنْ يَحْيَى بْنِ سَعِيدٍ، عَنْ مُحَمَّدِ بْنِ يَحْيَى بْنِ حَبَّانَ، عَنْ عَمِّهِ وَاسِعِ بْنِ حَبَّانَ، عَنْ عَبْدِ اللهِ بْنِ عُمَرَ
أَنَّهُ كَانَ يَقُولُ: إِنَّ نَاسًا يَقُولُونَ: إِذَا قَعَدْتَ عَلَى حَاجَتِكَ فَلَا تَسْتَقْبِلِ الْقِبْلَةَ وَلَا بَيْتَ الْمَقْدِسِ! فَقَالَ عَبْدُ اللهِ بْنُ عُمَرَ: لَقَدِ ارْتَقَيْتُ يَوْمًا عَلَى ظَهْرِ بَيْتٍ لَنَا، فَرَأَيْتُ رَسُولَ اللهِ ﷺ عَلَى لَبِنَتَيْنِ مُسْتَقْبِلًا بَيْتَ الْمَقْدِسِ لِحَاجَتِهِ. وَقَالَ: لَعَلَّكَ مِنَ الَّذِينَ يُصَلُّونَ عَلَى أَوْرَاكِهِمْ؟ فَقُلْتُ: لَا أَدْرِي وَاللهِ.
Reference: Sahih Al Bukhari 145