Answered by Shaykh Faraz Rabbani
I wanted to know if we are allowed to pray namaaz in pyjamas or a long nightie? Since I heard that this is not allowed.

Wa Alaykum Assalam wa Rahmatullah wa Barakatuhu,
In the Name of Allah, Most Merciful & Compassionate
It is obligatory to prayer, regardless of how one is dressed. After this, it is the sunna to wear dignified clothes, and improper not to when one can. [Ibn Abidin, Radd al-Muhtar]
Faraz Rabbani.
Please see the following links in answer to your question: