“The Prophet, peace and blessings be upon him, said to him: ‘Shall I not teach you some words to say when you retire to your bed…?’” He said: “Good, authentic, and singular.” The other has the wording: “I heard the Messenger of Allah, peace and blessings be upon him, instruct a man, when he lay down at night, to say…” Then he mentioned it.
Al-Nasa’i (778) also recorded it through Qutaybah ibn Sa‘id, from him, with the wording describing an action: “When he would retire…”
Second: from Sufyan al-Thawri, from him, with the wording: “When you retire…” Al-Nasa’i (457/770) and Ahmad (4/301) recorded it through ‘Ali ibn Hafs: al-Thawri narrated it to us.
Third: from Shu‘bah, from him, that he heard al-Bara’ ibn ‘Azib say: “The Messenger of Allah, peace and blessings be upon him, instructed a man to say it.”
It was recorded by al-Bukhari (11/113/6313), Muslim, al-Nasa’i (775), al-Tayalisi (97/708), Ahmad (4/300), al-Ruyani (f. 84/2), and al-Tabarani (2/902/241), through several chains from him, with this wording. Abu al-Walid al-Tayalisi differed, reporting it from Shu‘bah with the wording describing an action: “When he took to his bed, he would say…” Then he mentioned it. Al-Bayhaqi recorded it in Shu‘ab al-Iman (4/173/4706) and said: “They both recorded it in the Sahih from the hadith of Shu‘bah.”