Jami’ al-Tirmidhi – Hadith No : 3528

Amr bin Shu’aib narrated from his father, from his grandfather, that the Messenger of Allah said: “When one of you becomes frightened during sleep, then let him say: ‘I seek refuge in Allah’s Perfect Words from His anger, His punishment, and the evil of His creatures, from the whisperings of the Shayatin, and that they should come (A’udhu Bikalimatillahit-Tammati Min Ghadabihi Wa Iqabihi Wa Sharri Ibadih, Wa Min Hamzatish-Shayatini Wa An Yahdurun).’ For verily, they shall not harm him.’”He said: “So Abdullah bin Amr used to teach it to those of his children who attained maturity, and those of them who did not, he would write it on a sheet and then hang it around his neck.”

Hadith In Arabic Text :

حدثنا علي بن حجر، حدثنا إسماعيل بن عياش، عن محمد بن إسحاق، عن عمرو بن شعيب، عن أبيه، عن جده، أن رسول الله صلى الله عليه وسلم قال ‏”‏ إذا فزع أحدكم في النوم فليقل أعوذ بكلمات الله التامة من غضبه وعقابه وشر عباده ومن همزات الشياطين وأن يحضرون ‏.‏ فإنها لن تضره ‏”‏ ‏.‏ قال وكان عبد الله بن عمرو يلقنها من بلغ من ولده ومن لم يبلغ منهم كتبها في صك ثم علقها في عنقه ‏.‏ قال أبو عيسى هذا حديث حسن غريب ‏.‏

Chapter : Chapters on Supplication – كتاب الدعوات عن رسول الله صلى الله عليه وسلم