Sunan Ibn Majah, Book 1, Hadith 70 (Ibn Majah 336)

It was narrated from Bilal bin Al-Harith Al-Muzani that:

When the Messenger of Allah wanted to relieve himself, he would go far away.