All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
The act of the Sunnah is that the last words one should say before sleeping is the Thikr mentioned in the Hadeeth narrated on the authority of Al-Baraa’ ibn ‘Aazib who related that the Prophet said to him: “Whenever you go to bed, perform ablution like you would for the prayer, then lie on your right side and say: ‘Allaahumma aslamtu nafsi ilayk, wa fawwadhtu amri ilayk, wa alja’tu thahri ilayk, rahbatan wa raghbatan ilayk, la malja’a wa la manja minka illa ilayk. Aamantu bi-kitaabika allathi anzalta wa bi-nabiyyika allathi arsalt.’ (O Allah! I surrender myself to You, entrust (all) my affairs to You, and (totally) rely upon You in fear and hope of You. There is no refuge nor safe haven from You except with You. I believe in Your Book which You have revealed and in Your Prophet whom You have sent). Then, if you die, you will die upon Fitrah (i.e. sound natural disposition of faith), so let these words be the last thing you say.” [Al-Bukhaari and Muslim] The version cited in Saheeh Muslim reads: “…and let these words be among the last things you say.” [End of quote] Al-Haafith Ibn Hajar said in Fat-h Al-Baari: “His saying, ‘…and let these words be the last thing you say,’ and the narration of Al-Kushmeehani reads: ‘…and let these words be among the last things you say,’ indicating that it is not prevent one from reciting after them another type of Thikr that is prescribed to be recited before going to sleep.” [End of quote]
So, if a person recites after it the word of Tawheed, “La Ilaaha illa Allah”, to make it the last thing he says, without making this a regular habit, then we do not believe that there is anything wrong with that. However, adopting this as a regular habit would imply that it is an act of Sunnah, while it is not.
Allah Knows best.