ETIQUETTES OF RELIEVING ONESELF
Etiquettes of relieving oneself: Is to ease or alleviate, such as by urinating or defecating. It is prescribed for the Muslim, when he desires to relieve himself, that he distances himself (from the people).It is forbidden for the Muslim to relieve himself on a road, which the people use or in an area of shade, where the people sit under it. It is not permissible for him to relieve himself in these places, because he will cause them to become impure for other People. It is also advisable for a Muslim not to face or turn his back to the Qib’lah (The direction towards Kabah, where Muslims face while offering their Salah) when relieving himself or herself in the houses.
Allah (Glory be to Him) has Himself declared that the Messenger of Allah (May Allah honour Him and grant Him peace) is the absolute BEST example for the believers to follow. It is forbidden for the Muslim to relieve himself on a road, which the people use or in an area of shade, where the people sit under. This is based on what Abu Hurairah (R) reported from Allah’s Messenger (May Allah honour Him and grant Him peace), that he said: “Beware of the two things which provoke the curse (of people falling on you). The one who relieves himself on the road the people use or in their area of shade.” Sahih Al Muslim
Bismillah Allahummah inni aa'uzu bika minal khubuthi wal khabaa'ith, meaning "In the name of Allah" and "Oh Allah, I seek protection in You from unclean spirits, male and female" Sahih Muslim 275, Tirmidhi 6, Abu Dawud 4,5, Ibn Majah Vol 1:296 and Sunan Nasai Vol : 19
By saying the above two phrases it protects the person from the shaytaan (evil spirits/jinn), which, because they are evil, like to frequent dirty places and bring harm to people.
By saying "Bismillah" before entering the toilet, Allah (Glory be to Him) places a screen between the 'awrah (private parts) or a person and the jinn.
When one wishes to exit from the bathroom area, he should say what has been authentically, Ghufranaaka meaning "I seek Your forgiveness" Tirmidhi 7 and Ibn Majah 300
See Also:Family_Etiquettes_in_Islam; seeking knowledge; Etiquettes of Eating;