The Gemara in Masechet Berachot (60B) writes that when a person retires for the night he must recite the Beracha, "Ha'mapil Chevlei Sheina Al Einai…" From the Gemara it clearly emerges that this Beracha should be recited with "Shem U'malchut," meaning, with the complete, standard text of "Baruch Ata Hashem Elokeinu Melech Ha'olam." Furthermore, according to the text that appears in the Gemara, this Beracha concludes with the blessing, "Baruch Ata Hashem Ha'me'ir La'olam Kulo Bi'chvodo," which also contains God's Name as in standard Berachot. Accordingly, the Shulchan Aruch (Orach Hayim 239) rules that the Beracha of "Ha'mapil" is recited with "Shem U'malchut." This also emerges from the Bet Yosef in Siman 46.
Two approaches have been taken in understanding the nature of this Beracha. Some viewed this Beracha as a blessing which one recites over the actual experience of sleep. (Seder Hayom, Seder Keriat Shema Al Mita.) If so, then we would apply to this Beracha the standard rules of "Hefsek," which forbid any interruption between the recitation of a Beracha and the act or experience for which it is recited. Hence, it would be forbidden to speak after reciting this Beracha before falling asleep, and one who suspects that he might not fall asleep should not recite this Beracha with "Shem U'malchut."
Others, like the Keneset Gedola in siman 239:1, however, maintained that in reciting this Beracha we thank the Almighty in a general sense for the concept of sleep. It refers not to our personal experience of sleep, but rather for the phenomenon in general. According to this approach, one may recite the Beracha in its complete form even if he might not fall asleep immediately thereafter.
As for the accepted Halacha, the Ben Ish Chai (Rabbi Yosef Chayim of Baghdad, 1833-1909) in Parashat Pekude Ot 12, writes that neither he nor his father ever recited the Beracha of Ha'mapil with "Shem U'malchut." This practice, he writes, is based on the ruling of Rabbi Eliyahu Mani (Baghdad-Israel, 1824-1899), who wrote that if one suspects that he may interrupt between the recitation of Ha'mapil and falling asleep, it is preferable to omit "Shem U'malchut." Indeed, the practice we follow is to recite the Beracha of Ha'mapil without "Shem U'malchut," namely, without the words "Hashem Elokeinu Melech Ha'olam" at the beginning of the Beracha, and without the word "Hashem" in the concluding blessing of "Ha'me'ir La'olam Kulo Bi'chvodo."
One should ensure before going to sleep to recite not only this Beracha without Shem U’Malchut, but also the Shema and the entire service of Keri'at Shema Al Ha'mita as printed in Siddurim. The Rabbis tells us that Mazikin (harmful spiritual forces) threaten to cause a person harm as he sleeps, and the prayers of Keri'at Shema Al Ha'mita help protect a person from these forces. Additionally, this recitation helps protect a person from the particularly harmful influences exerted by the Yetzer Ha'ra (evil inclination) during sleep. The Gemara in Masechet Berachot (16a) records a prayer that Rabbi Elazar recited each day, in which he asked that "we shall awaken and find a desire in our hearts to fear Your Name." Rashi explains this prayer as asking for protection from the forces of the Yetzer Ha'ra that could potentially overcome a person through sinful thoughts as he sleeps. The recitation of Keri'at Shema Al Ha'mita provides a degree of protection from the Yetzer Ha'ra's particularly strong influence during the nighttime hours.
This Halacha applies equally to both men and women. The recitation of Keri'at Shema Al Ha'mita is required when a person sleeps, and it is only incidentally that we recite it only at night – the time when people generally sleep. Therefore, this obligation does not fall under the category of "time-bound" obligations, from which women are generally exempt, and thus women, too, must ensure to recite the complete service of Keri'at Shema Al Ha'mita. (Birkat Hashem, Vol. 4, page 500.)
It is proper to recite all three paragraphs of Shema as part of Keri'at Shema Al Ha'mita, and various Segulot (benefits) are associated with the recitation of all three paragraphs. (See Kaf Hachayim Sofer, 239, seif kattan 1.) If a person had yet to recite the evening Shema, such as if he recited Arvit before the earliest time for Shema, then he is obligated according to Torah law to recite all three paragraphs of Shema before going to sleep.
Summary: Both men and women must ensure to recite the entire service of Keri'at Shema Al Ha'mita, including all three paragraphs of Shema. The Beracha of "Ha'mapil" should be recited without the words "Hashem Elokeinu Melech Ha'olam," and without the word "Hashem" in the concluding Beracha of "Ha'me'ir La'olam Kulo Bi'chvodo."