'Abdullah bin 'Umar said:
"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. (ES)
English reference (ES): Vol. 1, Book 1, Hadith 322 (ES)
Arabic reference (ES): Book 1, Hadith 343 (ES)