The Ben Ish Hai (Parashat Pekudeh) emphasizes the importance of Keri’at Shema She’al Ha’mita – the Shema recitation before one goes to sleep at night (listen to audio recording for precise citation). He notes that the bedtime Shema is included among the four daily Shema recitations, the other three being the Shema recitation during the Korbanot service in the morning, the Shema recitation during the section of Yoser, and the Shema recitation during Arbit. The Ben Ish Hai mentions in this context that the bedtime Shema is on the lowest level of Kedusha (sanctity) than the other three recitations. The highest is the Shema of Yoser, the second highest is the Shema recitation during Korbanot, and the third highest is the Shema recited at Arbit. (Incidentally, this demonstrates the importance of the Shema recitation during Korbanot, of which many people are unaware.)
The Ben Ish Hai underscores the point that the recitation of the bedtime Shema requires special effort. Very often, he notes, by the time a person recites the bedtime Shema he is already drowsy and almost asleep, such that he is prone to slur or mispronounce the words. One must make a concerted effort to recite all the words of the Keri’at Shema She’al Ha’mita service properly. The Ben Ish Hai adds that the sequence of texts found in the Siddurim was arranged in accordance with the teachings of the Arizal (Rav Yishak Luria of Safed, 1534-1572), and should be followed.
The last text one should recite before going to sleep, the Ben Ish Hai writes, is the verse, "Be’yadecha Afkid Ruhi Padita Oti Hashem Kel Emet" (Tehillim 31:6). The first letters of the words "Be’yadecha Afkid Ruhi" ("Bet," "Alef," "Resh") spell the word "Be’er" (well of water), and the first letters of "Patida Oti Hashem" ("Peh," "Alef," "Yod") are the same letters as the first letters of the phrase "Pote’ah Et Yadecha" (Tehillim 145:16) and have the combined numerical value of 91. This number is the combined numerical value of the divine Names of "Havaya" (26) and "Adnut" (65). It is also the numerical value of the divine Name spelled by the letters "Samech," "Alef," "Lamed," which is alluded to in the first letters of the phrase, "Ata Seter Li" (Tehillim 32:7). The Ben Ish Hai writes that one should think of these concepts in his mind until he falls asleep. Those who are not knowledgeable enough to contemplate these allusions should think in their minds the Hebrew alphabet until they fall asleep, so that they fall asleep with the sacred letters of the Hebrew alphabet in their minds.
Summary: One must ensure to properly recite the full text of the bedtime Shema service, and often it requires special effort to overcome fatigue and recite the text properly. One who is able to do so should think in his mind the allusions that are embedded in the verse, "Be’yadecha Afkid Ruhi Padita Oti Hashem Kel Emet" until he falls asleep. If one is unable to do so, then he should at least contemplate the letters of the Hebrew alphabet in his mind until he falls asleep.