عَنْ أَبِي عَبْدِ الرَّحْمَنِ الْحُبُلِيِّ حَدَّثَهُ قَالَ أَخْرَجَ لَنَا عَبْدُ اللَّهِ بْنُ عَمْرٍو رَضِيَ اللَّهُ عَنْهُمَا قِرْطَاسًا وَقَالَ كَانَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ يُعَلِّمُنَا يَقُولُ اللَّهُمَّ فَاطِرَ السَّمَاوَاتِ وَالْأَرْضِ عَالِمَ الْغَيْبِ وَالشَّهَادَةِ أَنْتَ رَبُّ كُلِّ شَيْءٍ وَإِلَهُ كُلِّ شَيْءٍ أَشْهَدُ أَنْ لَا إِلَهَ إِلَّا أَنْتَ وَحْدَكَ لَا شَرِيكَ لَكَ وَأَنَّ مُحَمَّدًا عَبْدُكَ وَرَسُولُكَ وَالْمَلَائِكَةُ يَشْهَدُونَ أَعُوذُ بِكَ مِنَ الشَّيْطَانِ وَشِرْكِهِ وَأَعُوذُ بِكَ أَنْ أَقْتَرِفَ عَلَى نَفْسِي إِثْمًا أَوْ أَجُرَّهُ عَلَى مُسْلِمٍ قَالَ أَبُو عَبْدِ الرَّحْمَنِ كَانَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ يُعَلِّمُهُ عَبْدَ اللَّهِ بْنَ عَمْرٍو رَضِيَ اللَّهُ عَنْهُمَا أَنْ يَقُولَ ذَلِكَ حِينَ يُرِيدُ أَنْ يَنَامَ
It is narrated from Abu Abdur Rahman Hubli, he says: Sayyiduna Abdullah bin Amr (may Allah be pleased with him) took out a paper for us and said: The Messenger of Allah (peace and blessings be upon him) used to teach us this supplication: "O Allah! Creator of the heavens and the earth, Knower of the unseen and the seen, You are the Lord of everything and the God of everything. I bear witness that there is no god but You, You are alone, You have no partner, and that Muhammad (peace and blessings be upon him) is Your servant and Messenger, and the angels also bear witness to this. I seek refuge in You from Satan and his associating (others with You), and I seek refuge in You lest I commit a sin against myself or bring it upon a Muslim." Abu Abdur Rahman said: The Messenger of Allah (peace and blessings be upon him) taught this supplication to Sayyiduna Abdullah bin Amr (may Allah be pleased with him) and said that when he wishes to sleep, he should recite this supplication at that time.