A new Muslim girl fears that her family will see her praying; can she pray in the bathroom?
We ask Allah to increase you in faith and piety, and to grant you the joy of seeing your parents and relatives being guided to Islam.
Prayer is the most important pillar of Islam after the twin declaration of faith, and it is not permissible to omit it or be careless concerning it no matter what the reasons. Rather the individual should offer the prayer according to his ability, standing or sitting or lying down. He may even offer the prayer by means of gestures whilst walking if he is fleeing from a wild animal or flood. So long as he is of sound mind, the prayer is not waived for him. If it is difficult for him to pray at any time, it is permissible for him to put Zuhr and ‘Asr together, and to put Maghrib and ‘Isha’ together. This is by the grace and mercy of Allah.
Based on that, if your family’s seeing you pray will result in obvious trouble for you, such as being beaten or thrown out or shunned, then it is permissible for you to put Zuhr and ‘Asr together, and to put Maghrib and ‘Isha’ together, at the time of the earlier or later prayer, according to whatever is easiest for you, because putting prayers together is permissible for many reasons, including travel, sickness, rain, fear for oneself or one’s property, and to relieve one of hardship and difficulty.
As for praying in the bathroom, that is not allowed, whether it is a place that is only for bathing or it is a place for relieving oneself, because it is the abode of the devils and the place where ‘awrahs are uncovered. Al-Tirmidhi (317), Abu Dawood (492) and Ibn Maajah narrated from Abu Sa‘eed al-Khudri (may Allah be pleased with him) that he said: The Messenger of Allah (blessings and peace of Allah be upon him) said: “All the earth is a place of prayer except graveyards and bathrooms.” The hadeeth was classed as saheeh by Ibn Hibbaan and al-Albaani in Saheeh Sunan al-Tirmidhi.
This hadeeth indicates that prayers offered in the bathroom are not valid, hence it is not permissible to do that except in the case of necessity, such as if the harm that will befall you from your parents is extreme and you cannot pray anywhere else, even by putting prayers together as mentioned above. In that case it is permitted for you to pray in the bathroom.
Shaykh Ibn Baaz (may Allah have mercy on him) was asked about a Christian boy who became Muslim secretly and feared trouble for the sake of his religion if his family found out that he had become Muslim, and he is a young student in school. He does not have a place to pray and he is afraid that if they find out about him, they may send him to a kaafir country or try to make him give up his religion, and he is a person who cannot be steadfast because he is still young. Is it permissible for him to pray in the bathroom?
He replied: It seems that there is nothing wrong with it if he cannot find any other place. If he prays in front of them they may find out about him and try to make him give up his religion. If he cannot find any other place then there is nothing wrong with it, but he may find another place, or he may find a place for some of the prayers and not for others. Hence if he can find another place then he has to pray there, because praying in the bathroom is not allowed, as it is forbidden to pray in graveyards and bathrooms. But if he cannot find any other place, he should not omit the prayer. End quote.
See also the lecture: Mashaakil wa’l-Hulool by Shaykh Munajjid.
For more information please see also the answer to question no. 100627
And Allah knows best.