The Prophet (ﷺ) said: Do not pray behind a sleeping or a talking person.
Sunan Abi Dawud Book 2, Hadith 304