Answered by Shaykh Faraz Rabbani
Is wearing a topee/cap/turban during prayers a must?
Walaikum assalam,
It is mentioned in Maraqi al-Falah, and by Ibn Abidin in his Hashiya that not covering one’s head is somewhat disliked (makruh tanzihan) in prayer.
It does not affect the validity of one’s prayer, and it is superior to pray behind an imam who does not cover his head than to pray alone.
Wassalam,
Faraz.