In Islam, a man is permitted to take a bath with his wife, as the Prophet (peace and blessings be upon him) used to take a bath with his wife. Also, the husband is permitted to have sexual intercourse with his wife in the bathroom.
The prominent Saudi scholar Dr. `Abdul-Wahhab ibn Nasir Al-Tariri, states the following: “May Allah help you to do that which is good and make you satisfied with that which He has permitted you so that you will have no need of that which He has forbidden. What you have mentioned in your question may be clarified as follows:
1. The modern kinds of washrooms in modern houses differ greatly from the places used in the past for relieving oneself, which were places where dirt, filth and impurities collected. Modern washrooms are not like that; rather, they can be kept clean and there is no impurity in them. Therefore, they are not like the places that people used for relieving themselves in the past, and there are obvious differences between them. On the basis of this, there is no real reason why one should not fulfill one’s sexual desire in such places when necessary, in the manner that you mentioned.
2. A man fulfilling his sexual desire with his wife may often happen as the result of stimulation, by looking or touching, etc. Hence, fulfilling his desire when it is provoked in such situations is a means of keeping himself chaste and lowering his gaze (from looking at other women). This is what the Prophet (peace and blessings be upon him) taught us to do, according to the Hadith narrated by Muslim (1403) from Jabir. He said that the Messenger of Allah (peace and blessings be upon him) saw a woman and he came to his wife Zaynab, while she was tanning a skin and preparing it for dyeing, and he fulfilled his need. Then he went out to his Companions and said, “Woman comes and goes in the shape of a devil [i.e., she causes temptation], so if any one of you sees a woman, let him go and have intercourse with his wife, for that will take away what he feels in his heart.”
3. At the same time, the Muslim should not forget, when his desire is provoked, to bear in mind the intention of keeping chaste and of enjoying what is good and permissible. Then doing that will be an act of charity and righteousness on his part, as the Prophet (peace and blessings be upon him) said: “In the intimacy of any one of you there is charity.” They said, “O Messenger of Allah, if any one of us fulfils his desire will there be reward for him in that?” He said, “Do you not see that if he does it in a haram (forbidden) way, that will be a sin on him? So if he does it in a halal (lawful) way, he will be rewarded for that.” (Reported by Muslim)
A man should also recite the supplication that was narrated from the Prophet (peace and blessings be upon him) for this situation. The Prophet (peace and blessings be upon him) said, “When any one of you wants to have intercourse with his wife, let him say: ‘Bismillah, Allahumma jannibna ash-Shaytana wa jannib ash-Shaytana ma razaqtana (In the Name of Allah, O Allah, keep Satan away from us and from that with which You may bless us).’ Then if it is decreed that they should have a child from that, Satan will never be able to harm him.” (Narrated by Al-Bukhari and Muslim.)
Moreover, Sheikh M. S. Al-Munajjid, a prominent Saudi Muslim lecturer and author, adds:
“It is permissible for a man to have intercourse with his wife without a cover, and it is also permissible to have intercourse in the bathroom, but that means that he will be going against the Sunnah by not mentioning Allah beforehand. Perhaps you know that the Sunnah, when a man wants to have intercourse with his wife, is to say, ‘Bismillah, Allahumma jannibna ash-Shaytana wa jannib ash-Shaytana ma razaqtana (In the Name of Allah, O Allah, keep Satan away from us and from that with which You may bless us).