1. Enter with the left foot and leave with the right.
2. Supplicate when entering the toilet:
O Allah, I seek refuge in You from Al-Khubth and Al-Khabaa'ith.
3. Supplicate when leaving:
O ALLAH! I seek Your pardon, All praises are due to Allah Who has taken away from me discomfort and granted me relief.
People use the bathroom many times during the day and night. If they observe these Sunan for entering and leaving every time they go, they will fulfill two Sunan for entering and two Sunan for leaving.
*Al-Khubth and Al-Khabaa'ith - These are male and female devils. In order to be protected by Allah from their evil, one should seek refuge from them when entering the toilet. The toilet is one of their place abode.
*No evidence for entering with the left foot and leaving with the right was found. Therefore, it seems that general evidences indicating the use of the right for good and the left for the opposite have been used.