The complete hadith about sitting to relieve oneself is reported from Sayyiduna Abdullah bin Umar (may Allah be pleased with them both). In it he said: Perhaps you are one of those who pray upon their haunches. The narrator says: I said: By Allah, I do not know. He said: He meant the one who, in prostration, does not raise himself off the ground, that is, he prostrates while clinging to the ground.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 2715