Praise be to Allah.
The Qur’aan is the best book that mankind has ever known, because it is the Word of the Lord of the Universe, which was brought
down by the trustworthy Spirit [i.e., Jibreel] to the heart of the noble Messenger, to bring mankind forth from darkness into light, and guide
them to the straight path. It is the Book whose miracle abides, the proof of which is constantly renewed; Falsehood cannot come to it from before
it or behind it, (it is) sent down by the All Wise, Worthy of all praise (Allaah) [cf. Fussilat 41:42]
There are kinds of etiquette that have to do with this Book, to which attention should be paid when reciting it. One of these rules is that the place where it is recited should be clean. In his valuable book al-Tibyaan, Imam al-Nawawi (may Allaah have mercy on him) mentioned some of the etiquette which the Muslim should pay attention to when reciting the Book of Allaah. He mentioned the issue of reciting Qur’aan in bathrooms and toilets, and he quoted the views of scholars on this matter. He said:
“It is mustahabb to recite Qur’aan in a place that is clean and suitable. Hence a number of scholars regarded it as mustahabb to read Qur’aan in the mosque because it is both clean and a honourable environment… With regard to reciting Qur’aan in the bathroom, the salaf differed as to whether it is makrooh. Our companions – i.e., the Shaafa’is – said that it is not makrooh. This was quoted by Abu Bakr ibn al-Mundhir in al-Ishraaf from Ibraaheem al-Nakha’i and Maalik, and it is the view of ‘Ata’.
Some regarded it as makrooh, such as ‘Ali ibn Abi Taalib (may Allaah be pleased with him). This was narrated from him by Ibn Abi Dawood.
Ibn al-Mundhir narrated from a group of the Taabi’een – including Abu Waa’il Shaqeeq ibn Salamah, al-Shu’bi, al-Hasan al-Basri, Makhool, Qubaysah ibn Dhu’ayb, and from Abu Haneefah (may Allaah be pleased with them all) that al-Shu’bi said: it is makrooh to recite Qur’aan in three places: bathrooms, toilets …. It was narrated that Abu Maysarah said: Allaah should not be remembered except in good (clean) places.”
Shaykh Ibn ‘Uthaymeen (may Allaah have mercy on him) was asked:
Is it permissible to remember Allaah (dhikr) in the bathroom?
A person should not remember his Lord inside the bathroom, because this place is not appropriate for that. If he remembers Him in his heart there is nothing wrong with that, but he should not utter the words out loud. It is better not to speak the words out loud in this place, and to wait until he has come out of it.
With regard to places for doing wudoo’ that are outside the toilets where one relieves oneself, there is nothing wrong with remembering Allaah there.
Majmoo’ Fataawa Ibn ‘Uthaymeen, 11/109.