Hadith 2404

Abu Sa'id reported God's messenger as saying that if anyone says three times when going to bed, "I ask the forgiveness of God than whom there is no god, the Living, the Eternal, and I turn in repentance to Him," God will forgive him his sins, even if they are like the foam of the sea, or in number like the sand which is accumulated,* or as many as the leaves of the trees, or as numerous as the days of this world. *The word is ‘alij. Some say ‘Alij is a place in the desert, the translation being ‘the sand of ‘Alij; others treat it as translated above. Tirmidhi transmitted it, saying this is a gharib tradition.

وَعَنْ أَبِي سَعِيدٍ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: " مَنْ قَالَ حِينَ يَأْوِي إِلَى فِرَاشِهِ: أَسْتَغْفِرُ اللَّهَ الَّذِي لَا إِله إِلا هوَ الحيَّ القيومَ وأتوبُ إِليهِ ثَلَاثَ مَرَّاتٍ غَفَرَ اللَّهُ لَهُ ذُنُوبُهُ وَإِنْ كَانَتْ مِثْلَ زَبَدِ الْبَحْرِ أَوْ عَدَدَ رَمْلِ عَالَجٍ أَوْ عَدَدَ وَرَقِ الشَّجَرِ أَوْ عَدَدَ أَيَّامِ الدُّنْيَا ". رَوَاهُ التِّرْمِذِيُّ وَقَالَ: هَذَا حَدِيثٌ غَرِيب

Reference: 5624040
In-book reference: Book 9, Hadith 2404