Is it permissible for a Muslim, after relieving himself in the bathroom to say “Bismillaah” inside the bathroom and then do wudoo’, or should he go out, say “Bismillaah” then go back in and do wudoo’ (because there is no wudoo’ for the one who does not mention the name of Allaah)? Is it permissible to mention the name of Allaah when I am taking a bath in the bathroom?
Shaykh Ibn ‘Uthaymeen was asked about that and he said:
When a person is in the bathroom, he should say the name of Allaah in his heart and not utter it aloud. So if you are in this situation, do this. The more correct opinion is that saying the name of Allaah is not obligatory, rather it is mustahabb, but you should not pay attention to waswaas (insinuating whispers from the Shaytaan) or be negligent.