Praise be to Allah.
Prayer rooms that are built in houses or in some institutions and businesses, with the intention that only the people who live and work in those places will pray in them, and which are not intended as public mosques that are open to all Muslims, do not come under the same rulings as mosques. In olden times, the practice was that a man would set aside a place in his house for prayer, which was called musalla al-bayt (the prayer room of the house) or masjid al-bayt (the mosque of the house), but this “mosque” did not come under the well-known rulings on mosques.
Al-Bukhaari (425) and Muslim (33) narrated from ‘Itbaan ibn Maalik (may Allah be pleased with him) that when he became blind and it was too difficult for him to go to the mosque on rainy days and when there were floods, he asked the Prophet (blessings and peace of Allah be upon him) to come to his house and pray in a spot that ‘Itbaan could take as a musalla. The Prophet (blessings and peace of Allah be upon him) responded to his request.
Al-Haafiz Ibn Hajar said: One of the things that we learn from this hadeeth is that setting aside a place in the house for prayer does not mean that it becomes a waqf, even if it is called a mosque. End quote.
Ibn Qudaamah said in al-Mughni (4/464): The “mosque” in a house does not come under the real rulings on mosques. End quote.
It says in al-Mawsoo‘ah al-Fiqhiyyah (2/121):
A mosque in the house is not a mosque in the real sense and does not come under the same rulings, so it is permissible to change it and for a person who is in a state of janaabah to sleep in it. End quote.
Based on this, this prayer room in the house does not come under the same rulings as a mosque and there is nothing wrong with turning it into rooms for accommodation.
It should be noted that offering prayers in congregation is obligatory and is to be done in the mosque; it is not permissible to offer these prayers at home, even if it is done in congregation, except in the case of one who has an excuse, such as if he is sick or the mosque is too far away, and the like.
For more information please see the answer to question number 72895.
And Allah knows best.