The Messenger of Allah ﷺ said, "I have been forbidden from praying behind those who are talking or sleeping."
قال رسول الله ﷺ: نهيت أن أصلي خلف المتحدثين والنيام.
No references are available.
Tabarani reported it in Al-Awsat ("Majma Bahrayn") (747) from Muhammad bin Fadl Saqati, who said, Sahl bin Salih Antaki told us, Shuja bin Walid told us, from Muhammad bin Amr, from Abu Salama, from Abu Hurairah, and he related the hadith. Tabarani said, "Only Shuja narrated from Muhammad bin Amr, and Sahl alone transmitted it."I say, Sahl bin Salih being the sole transmitter does not harm the report. He is Sahl bin Hakeem Antaki, Abu Saeed Bazzar, whom Abu Hatim and others deemed reliable. However, Haythami said in Al-Majma (2/62), "It contains Muhammad bin Amr bin Alqama, concerning whom there is disagreement as to whether his reports can be relied upon."I say, Muhammad bin Amr bin Alqama Laythi has reports narrated from him by Bukhari paired with others, and by Muslim as corroborating evidence. Dhahabi said, "A well known shaykh, hasan in his hadith, who narrated extensively from Abu Salama bin Abdul-Rahman, and the two shaykhs (Bukhari and Muslim) both included his reports as corroboration." As for the shaykh of Tabarani, he is reliable, as Khatib stated in Tarikh Baghdad (153/2). A narrator like this makes his hadith hasan.There are other hadiths on this subject, but all of them are daif. Among them is what was reported from Ibn Abbas, "Do not pray behind someone sleeping or someone talking." Abu Dawud (694) and Ibn Majah (959) both reported it from the hadith of Muhammad bin Kaab, from Ibn Abbas, relating the hadith.Abu Dawud said, "This hadith has been reported through more than one route from Muhammad bin Kaab, but all of them are frail. This particular route is the best of them, and it too is daif."I say, it is as he said. In the chain of Abu Dawud there is a man who is not named, and in the chain of Ibn Majah there is Abu Miqdam, who is Hisham bin Ziyad bin Abu Yazid Madani, who is discarded as a narrator.Khattabi said in his Maalim, "This is a hadith that cannot be soundly traced back to the Prophet ﷺ, due to the weakness of its chain. Abdullah bin Yaqub did not name who reported it to him from Muhammad bin Kaab. In fact, it was reported from Muhammad bin Kaab by two men, both of them daif, Tamam bin Bazi and Isa bin Maymun, and Ibn Main and Bukhari both criticized them. It was also reported by Abdul-Kareem Abu Umaya, from Mujahid, from Ibn Abbas, but Abdul-Kareem is discarded as a narrator. It has been established regarding the Prophet ﷺ that he prayed while Ayesha was asleep, lying crosswise between him and the qibla."I say, the Hafiz said in Al-Fath (587/1), "Mujahid, Tawus, and Malik disliked praying facing a sleeping person, out of concern that something might occur from him that would distract the one praying from his prayer. The apparent practice of the author, meaning Imam Bukhari, who titled a chapter 'Prayer Behind a Sleeping Person' and included in it the aforementioned hadith of Ayesha, indicates that there is no dislike where there is assurance against that happening." End of quote. And in this way the two hadiths are reconciled.