we used to pray along with the Messenger of Allah ﷺ in intense heat. When any of us could not rest his face on bare ground while prostrating due to intense heat he spread his cloth and would prostrate on it. (Using translation from Abū Dāʾūd 660)
كُنَّا نُصَلِّي مَعَ النَّبِيِّ ﷺ فِي شِدَّةِ الْحَرِّ فَإِذَا لَمْ يَسْتَطِعْ أَحَدُنَا أَنْ يُمَكِّنَ وَجْهَهُ مِنَ الْأَرْضِ بَسَطَ ثَوْبَهُ فَسَجَدَ عَلَيْهِ