It was narrated that Zaid bin Arqam said:
The Messenger of Allah said: 'These Hushush (waste areas) are visited (by devils), so when anyone of you enters, let him say: 'Allahumma inni a`udhu bika minal-khubthi wal-khaba'ith (O Allah, I seek refuge with You from male and female devils).' (Sahih) Other chains with similar wording.