Allaah says (interpretation of the meaning) : (Surat al-A'raf: 31) From this verse it is understood that clothing plays an important role in performing the prayers . The Prophet (peace and blessings of Allaah be upon him) used to cover his head and pray , so should we. The Companions and the Tabi'is also attached great importance to this matter. Such as- Hasan Ibn Ali. Come on , he wore the best clothes during prayers. One day when someone asked him about it, he said , " Surely Allah is beautiful and He loves the beautiful." So I put on beautiful clothes for my ****. (Ruhul Maani 4/349) Hasan Basri Rah. Said , they (due to the heat of the Companions) used to prostrate on turbans or hats. (Bukhari 1/6) Zuhair (Rah.) Said , I saw the famous Tabi'i Abu Ishaq Sabi'i , he prayed with us. He lifted his hat from the ground and put it on his head . (Fatawa Qazikhan: 1/135)