Sayyiduna Ibn Umar (may Allah be pleased with him) says: The Messenger of Allah (peace and blessings be upon him) went to visit one of his Companions who was ill, and I was with him (peace and blessings be upon him). He (peace and blessings be upon him) went in to him and found him praying on a piece of wood (leaning on it), placing his forehead on that wood. He (peace and blessings be upon him) gestured to him, so he put the wood aside and took hold of a pillow. At that, the Messenger of Allah (peace and blessings be upon him) said: "Leave that as well. If you are able to prostrate on the ground, then do so; otherwise, prostrate by gesturing, and make your prostration lower than your bowing."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 13026