It is narrated from Sayyiduna Jabir bin Abdullah (may Allah be pleased with them both): "I used to pray the Zuhr prayer with the Messenger of Allah (peace and blessings be upon him). I would take a handful of pebbles in my hand so that they would cool down, and I would put them at my place of prostration so that I could prostrate on them, protecting myself from the scorching heat."
Imam al-Bayhaqi (may Allah have mercy on him) says that if prostrating on a garment that is attached to one were permissible, that would have been easier than cooling pebbles in the hands and then placing them at the place of prostration.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 2658