Before one goes to sleep, he recites not only the Shema, but also the Beracha of "Ha'mapil Chevlei Sheina Al Einai…" Originally, this Beracha was instituted to be recited with "Shem U'malchut," meaning, with the phrase, "Hashem Elokenu Melech Ha'olam." Nevertheless, many have the practice to recite this Beracha without "Shem U'malchut"; this is the position of the Ben Ish Chai (Rabbi Yosef Chayim of Baghdad, 1835-1909), and this is indeed our practice. And even those authorities who require reciting the Beracha with "Shem U'malchut" agree that the Beracha is not recited if one goes to sleep after Chatzot (midnight as defined by Halacha).
Before going to sleep one should also recite the declaration, "Ribono Shel Olam Hareni Mochel Ve'solei'ach…" as printed in the Siddurim. In this declaration one grants forgiveness to anyone who wronged him at any point during that day. The source of this practice is the Gemara's account that Mar Zutra would say each night before going to sleep, "Shari Lei Le'man De'tza'aran" – "I forgive anyone who caused me distress."
However, Chacham Bentzion Abba Shaul (Israel, 1924-1998) writes that a person should recite this declaration only if he sincerely grants forgiveness to anyone who has wronged him. If a person has a grievance towards an individual for which he is not yet prepared to forgive, he should omit this recitation. He should recite it only when he feels capable of sincerely forgiving the individual for the wrong committed against him.
Summary: Before going to sleep one should recite the Shema and the Beracha of Ha'mapil, which according to our custom should be recited without the phrase "Hashem Elokenu Melech Ha'olam." Additionally, one should declare his forgiveness for anyone who has wronged him by reciting "Hareni Mochel"; if he does not yet forgive a certain individual, he should not recite this declaration until he indeed grants sincere forgiveness.