Halakha Mazmur 4:5: Mishneh Torah, Prayer and the Priestly Blessing & Shulchan Arukh, Orach Chayim

רִגְז֗וּ וְֽאַל־תֶּ֫חֱטָ֥אוּ אִמְר֣וּ בִ֭לְבַבְכֶם עַֽל־מִשְׁכַּבְכֶ֗ם וְדֹ֣מּוּ סֶֽלָה׃

Gemetarlah, dan jangan berbuat dosa; renungkanlah dalam hatimu di atas tempat tidurmu, lalu diamlah. Sela.

Mishneh Torah, Prayer and the Priestly Blessing

He then reads the first section of the Shema and sleeps. If he is overcome by drowsiness, he reads even if it be only one verse [of the Shema] or verses of a supplicatory character and sleeps.
Tanya RabiBookmarkShareCopy

Shulchan Arukh, Orach Chayim

One who is sick [may] pray even lying down on one's side, as long as he is able to concentrate (And if it is not possible from him to pray, nevertheless, one should meditate in one's heart, as it says "Ponder [it] on your bed" [(Psalms 4:5)] (Beit Yosef in the name of Orchot Chaim and Pesikta).
Tanya RabiBookmarkShareCopy