"People say: 'When you sit to relieve yourself, do not face the Qiblah.' But one day I climbed up onto the roof of our house, and I saw the Messenger of Allah sitting on two bricks (to relieve himself), facing the direction of Baitul-Maqdis (Jerusalem)." This is a Hadith narrated by Yazid bin Harun.
أُنَاسٌ إِذَا قَعَدْتَ لِلْغَائِطِ فَلاَ تَسْتَقْبِلِ الْقِبْلَةَ وَلَقَدْ ظَهَرْتُ ذَاتَ يَوْمٍ مِنَ الأَيَّامِ عَلَى ظَهْرِ بَيْتِنَا فَرَأَيْتُ رَسُولَ اللَّهِ ﷺ قَاعِدًا عَلَى لَبِنَتَيْنِ مُسْتَقْبِلَ بَيْتِ الْمَقْدِسِ هَذَا حَدِيثُ يَزِيدَ بْنِ هَارُونَ