Is it permissible to prostrate when wearing a cap if it covers the place of prostration on the forehead? Is it permissible to pray wearing gloves?.
The scholars are agreed that it is better for a worshipper’s forehead and hands to touch the ground directly when he prostrates, except when he has an excuse.
They differed as to whether that is obligatory. Imam al-Shaafa’i was of the view that it is obligatory, but the majority of scholars are of the view that it is mustahabb only, and is not obligatory.
Al-Nawawi (may Allaah have mercy on him) said, explaining the views of the scholars on this issue:
The views of the scholars with regard to prostrating on one's sleeve, hem, hand, the end of one’s turban or anything else that is attached to the person. We have mentioned that our view is that it is not correct to prostrate on any of these things. This is also the view of Dawood and of Ahmad, according to one report.
Maalik, Abu Haneefah, al-Awzaa’i, Ishaaq and Ahmad (according to the other report) said that it is valid. The author of al-Tahdheeb said: This is the view of the majority of scholars. They quoted as evidence the hadeeth of Anas (may Allaah be pleased with him) who said: We used to pray with the Messenger of Allaah (peace and blessings of Allaah be upon him) when it was intensely hot, and if one of us could not bear to place his forehead on the ground, he would spread out his garment and prostrate on it. Narrated by al-Bukhaari and Muslim.
It was narrated that Ibn 'Abbaas (may Allaah be pleased with them) said: I saw the Messenger of Allaah (S) on a rainy day, avoiding the mud when he prostrated by placing a garment that he was wearing beneath his hands. Narrated by Ibn Hanbal in his Musnad.
It was narrated that al-Hasan said: The companions of the Messenger of Allaah (peace and blessings of Allaah be upon him) used to prostrate with their hands inside their garments, and a man would prostrate on his turban. Narrated by al-Bayhaqi.
And he said: The scholars are unanimously agreed that it is preferable for the forehead to touch the ground directly when prostrating. End quote from al-Majmoo’, 3/397-400
Ibn Qudaamah (may Allaah have mercy on him) said: The worshipper does not have to touch the ground directly with any part of his body. Al-Qaadi said: If he prostrates on the end of his turban, or on his sleeve or hem, his prayer is valid according to one report. This is the view of Maalik and Abu Haneefah. Those who allow prostrating on one’s garment when it is too hot or too cold include ‘Ata’, Tawoos, al-Nakha’i, al-Sha’bi, al-Awzaa’i, Maalik and Ishaaq.
Prostrating on the end of one's turban was allowed by al-Hasan, Makhool, and ‘Abd al-Rahmaan ibn Yazeed. Shurayh prostrated on his burnous.
End quote from al-Mughni, 1/305
Shaykh Ibn ‘Uthaymeen (may Allaah have mercy on him) was asked: If a worshipper prostrates and puts his turban down as a protection between him and the ground, what is the ruling on his prayer?
He replied: The prayer of that worshipper is valid, but he should not use his turban as a protection between him and the ground except in cases of need, such as when the ground is very hard, or there are stones that may hurt him, or thorns. In that case there is nothing wrong with protecting himself from the ground with something that is attached to him, such as his turban or clothing, because Anas ibn Maalik (may Allaah be pleased with him) said: We used to pray with the Prophet (peace and blessings of Allaah be upon him) when it was very hot, and if one of us could not put his forehead on the ground, he would spread out his garment and prostrate on it. This indicates that it is better to let the forehead touch the place of prostration directly, but there is nothing wrong with a man protecting himself from the ground with something that is attached to him such as his garment or turban, if there is a need for that because the ground is very hot or very cold, or it is rough. But he should remember that it is also essential to allow the nose to touch the ground as well in this case, because of the hadeeth of Ibn ‘Abbaas (may Allaah be pleased with him) who narrated that the Prophet (peace and blessings of Allaah be upon him) said: “I have been commanded to prostrate on seven bones: the forehead” – and he pointed to his nose –“ the hands, the knees and the ends of the feet.” End quote.
Fataawa al-Shaykh Ibn ‘Uthaymeen, 13/question no. 519
And Allaah knows best.