In the Name of Allah, the All-Merciful, the Mercy-Giving
All praise is due to Allah. Peace and blessings be upon His Messenger Muhammad
I guess that your question refers to the presence of jinn and Satans in toilets. However, modern houses cannot dispense with toilets, whether adjoined to bedrooms or not.
Anyway, a Muslim can simply avoid the dangers of these creatures by closing the door of the toilet and mentioning the name of Allah while closing it, particularly before sleeping.
The Messenger of Allah (peace and blessings be upon him) said, “Cover vessels and waterskins, close the doors and extinguish the lamps, for the Satan cannot not loosen the waterskin, nor open the door, nor uncover the vessels.” (Muslim)
Almighty Allah knows best.
Views expressed by hosts/guests on this program (live dialogue, Facebook sessions, etc.) are their own and their appearance on the program does not imply an endorsement of them or any entity they represent.