There are a number of invocations that the Prophet (Allah bless him and grant him peace) would perform before going to sleep. These include:
a. 1. The narration of Anas ibn Malik (Allah be well pleased with him) that when the Prophet (Allah bless him and grant him peace) went to bed he would state:
الْحَمْدُ لِلَّهِ الَّذِي أَطْعَمَنَا وَسَقَانَا وَكَفَانَا وَآوَانَا فَكَمْ مِمَّنْ لَا كَافِيَ لَهُ وَلَا مُؤْوِيَ
[Muslim]
b. 2. The narration of `A’isha (Allah be well pleased with her) that the Prophet (Allah bless him and grant him peace) would recite the three Quls, namely al-Ikhlas, al-Falaq, and al-Nas, every night and then rub his body with his two hands. [Bukhari]
c. 3.The narration of Abu Hurayra (Allah be well pleased with him) where the Prophet (Allah bless him and grant him peace) instructed him to recite ayat al-kursi before sleeping, which would prevent the devil from coming close to him and Allah would protect him throughout the night.
d. 4. The narration of Bara’ (Allah be well pleased with him) that the Prophet (Allah bless him and grant him peace) said, “Shall I not teach you some words that you’ll say when going to bed such that if you die that night you will die on the fitra and if you wake up you will attain the good? Say:
اللَّهُمَّ إِنِّي أَسْلَمْتُ نَفْسِي إِلَيْكَ وَوَجَّهْتُ وَجْهِي إِلَيْكَ وَفَوَّضْتُ أَمْرِي إِلَيْكَ رَغْبَةً وَرَهْبَةً إِلَيْكَ وَأَلْجَأْتُ ظَهْرِي إِلَيْكَ لَا مَلْجَأَ وَلَا مَنْجَى مِنْكَ إِلَّا إِلَيْكَ آمَنْتُ بِكِتَابِكَ الَّذِي أَنْزَلْتَ وَنَبِيِّكَ الَّذِي أَرْسَلْتَ
[Tirmidhi]
e. 5. The narration of Abu Hurayra that the Prophet (Allah bless him and grant him peace) would say before going to sleep while lying on his right:
بِاسْمِكَ رَبِّي وَضَعْتُ جَنْبِي وَبِكَ أَرْفَعُهُ إِنْ أَمْسَكْتَ نَفْسِي فَارْحَمْهَا وَإِنْ أَرْسَلْتَهَا فَاحْفَظْهَا بِمَا تَحْفَظُ بِهِ عِبَادَكَ الصَّالِحِينَ
[Abu Dawud, Tirmidhi, Muslim with very similar wording]
f. 6. The narration of Bara’ (Allah be well pleased with him) that when the Prophet (Allah bless him and grant him peace) intended to sleep he would place his hand under his cheek and say:
اللَّهُمَّ قِنِي عَذَابَكَ يَوْمَ تَبْعَثُ عِبَادَكَ
[Abu Dawud, Ahmad]
There are a number of other soundly established narrations relating to what one can do and say before sleeping. The above should, insha’Allah, suffice.