Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
tabarani:3454Hāshim b. Marthad > Muḥammad b. Ismāʿīl b. ʿAyyāsh from my father > Ḍamḍam b. Zurʿah > Shurayḥ b. ʿUbayd > Abū Mālik al-Ashʿarī

[Machine] The Messenger of Allah ﷺ said, "Let one of you say when he wants to sleep, 'I have believed in Allah and disbelieved in the tyrant and the promise of Allah is true and the messengers are truthful. O Allah, I seek refuge in You from the evil of this night, except for a knock that brings goodness.'"  

الطبراني:٣٤٥٤حَدَّثَنَا هَاشِمُ بْنُ مَرْثَدٍ ثنا مُحَمَّدُ بْنُ إِسْمَاعِيلَ بْنِ عَيَّاشٍ حَدَّثَنِي أَبِي حَدَّثَنِي ضَمْضَمُ بْنُ زُرْعَةَ عَنْ شُرَيْحِ بْنِ عُبَيْدٍ عَنْ أَبِي مَالِكٍ الْأَشْعَرِيِّ قَالَ

قَالَ رَسُولُ اللهِ ﷺ لِيَقُلْ أَحَدُكُمْ حِينَ يُرِيدُ أَنْ يَنَامَ آمَنْتُ بِاللهِ وَكَفَرْتُ بِالطَّاغُوتِ وَعْدُ اللهِ حَقٌّ وَصَدَقَ الْمُرْسَلُونَ اللهُمَّ إِنِّي أَعُوذُ بِكَ مِنْ طَوَارِقِ هَذَا اللَّيْلِ إِلَّا طَارِقًا يَطْرُقُ بِخَيْرٍ  


See similar narrations below:

Collected by Suyūṭī
suyuti:18447a
Request/Fix translation

  

السيوطي:١٨٤٤٧a

"لِيَقُلْ أحَدُكُمْ حِينَ يُرِيدُ أنْ يَنَامَ: آمَنْتُ بِاللهِ، وَكفَرْتُ بالطَّاغُوتِ، وَعْدُ اللهِ حَقٌّ، وَصَدَقَ المُرْسَلُونَ، اللَّهُمَّ تبتُ إِلَيكَ وَأنَا مِنَ المُسْلِمِينَ، اللَّهُمَّ أَعُوذُ بِكَ مِنَ طَوَارِقِ هَذَا اللَّيلِ إِلَّا طَارِقًا (، ) يَطرُقُ بخَيرٍ".  

ابن جرير، [طب] الطبرانى في الكبير عن أبي مالك الأشعرى