It is permissible for a patient to pray on their bed facing the Qiblah (direction faced for Prayer towards the Ka‘bah) as long as they are unable to stand, for the Prophet (peace be upon him) said in case of the sick:
“Offer Salah standing and if you cannot, then sitting; and if you cannot, then lying on your side.”
(Part No. 6; Page No. 367) May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.