Sayyiduna Jabir bin Abdullah (may Allah be pleased with them both) narrates: The Prophet (peace and blessings be upon him) went to visit a sick person, and I was with him. The Prophet (peace and blessings be upon him) saw that the man was praying and prostrating on a pillow, so the Prophet (peace and blessings be upon him) forbade him. He said: "If you are able to prostrate on the ground, then prostrate; otherwise, make gestures, and (while gesturing) bend lower in prostration than in bowing."
Al-Bazzar recorded it, and Abu Ya'la recorded something similar, except that he narrated these words: "The Prophet (peace and blessings be upon him) went to visit a sick person. He saw him praying on a pillow (that is, prostrating on a pillow), so he put the pillow aside. The man then took hold of a piece of wood and was praying with its support, so he put that aside as well." The narrators of al-Bazzar are the narrators of the Sahih.
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الصلاة / 2894