Obviously prayer mats are the main answer ; But in the case a prayer mat isn't available what else can I use ? ( eg : A mattress. ? )
Did the prophet () have a prayer mat?
There's no backup for him having one as we use today. He prayed on prayer mats that were made from palm sheets or sheets of other plants and rarely used mats made from animal fur. And he also prayed on earth without using any separator.
You can pray on any tahir ground even on soil.
'The earth has been made for me a place of prostration and a means of purification, so wherever a man of my Ummah is when the time for prayer comes, let him pray.' (Sunan an-Nasa-i and also as a part of a hadith in Sahih Muslim and Sahih al-Bukhari and many other hadith compilations)
Further note that at the time a prayer mat (as we usually use today) or a carpet would be a kind of luxury, which doesn't go along with the character of modesty of our prophet ().
I too had asked myself that question years ago.
I might be wrong in saying this. I don't think Muhammad had ever possessed a prayer rug, especially any with decorations, even Islamic designs. Being a man of frugality with astere tastes, he used a palm frond or straws to pray upon, plain unadorned mats.
Somewhere in the ahadith, Muhammad was once offered a prayer rug. He shunned it by throwing a cloak all over it and prayed thereupon. He disliked to be distracted by decorations, while he prayed. He disliked too the ornations in prayer houses. He never liked praying before the distracting sight of riches.
Carpeted prayer rugs came into use, when some worshippers as travellers had needed them to protect their feet and knees against the heat of scorching sand under hot sun. Also, ornate rugs were used as luxury items: theirs owners used them to flaunt their wealth and status, while poors prayed on palm, straws, cloaks, etc. I heard all that on video in Youtube and it was titled "Are prayer rugs bidah?" It is removed. I remember having watched it few years ago.
Whether prayer rugs are bidah or not, see links below: https://www.bakkah.net/en/common-acts-of-religious-exccessiveness-ghuluww-regarding-prayer-rugs.htm https://www.muslimsandtheworld.com/are-prayer-mats-a-sunnah-or-bidah/