Praying on rugs is permissible in principle. Al-Bukhaari (379) and Muslim (513) narrated that Maymoonah (may Allaah be pleased with her) said: The Messenger of Allaah (peace and blessings of Allaah be upon him) used to pray on a khumrah.
A khumrah is a small mat made of palm leaves that is big enough for the face, on which a worshipper may prostrate to protect himself from the heat or coldness of the ground.
Al-Khattaabi favoured the view that the khumrah may be bigger than that, and he quoted as evidence the report narrated by Abu Dawood (5247) from Ibn ‘Abbaas, who said: A mouse came and started dragging the wick of the lamp and threw it in front of the Messenger of Allaah (peace and blessings of Allaah be upon him), on the khumrah on which he was sitting, and it burned an area the size of a dirham… This hadeeth was classed as saheeh by al-Albaani in Saheeh Abi Dawood, 4369.
It says in ‘Awn al-Ma’bood: This clearly shows that the word khumrah may apply to a large mat. This was also stated in al-Nihaayah.
See Fath al-Baari, 333.
Al-Shawkaani said:
This hadeeth indicates that there is nothing wrong with praying on a mat, regardless of whether it is made of rags, palm leaves or anything else, whether it is small or big, like a mat or carpet, because it is proven that the Prophet (peace and blessings of Allaah be upon him) prayed on mats, carpets and animal pelts. [...]