when entering the toilet he pbuh would say:
“o allah, i seek refuge with you from evil and evil ones."1
and upon coming out he pbuh would say: “i seek your forgiveness.”2
he pbuh usually urinated while squatting.
he pbuh sometimes cleaned himself with water, sometimes with stones and sometimes used both.
he pbuh used his left hand to clean himself.
after cleaning with water, he would rub his hand against the ground.
when travelling, he pbuh would go far away to relieve himself in order to conceal himself from his companions.
he pbuh sometimes screened himself behind bushes and sometimes behind palms.
he pbuh selected the soft parts of the ground for urination.
he pbuh would not raise his garment until he was down close to the ground.
he pbuh would not speak or answer greetings while relieving himself.
1 narrated by al-bukhari and muslim.
2 abu dawud, at-tirmidhi and ibn majah.