The prayer was called while the Prophet ﷺ was speaking privately with a man at the side of the mosque, and he did not rise to lead the prayer until the people had fallen asleep.
أقيمت الصلاة والنبي ﷺ يناجي رجلا في جانب المسجد، فما قام إلى الصلاة حتى نام القوم.
Bukhari narrated it in the chapter on the adhan (642) and in the chapter on seeking permission (6292), and Muslim narrated it in the chapter on menstruation (376), both through Abdul-Aziz bin Suhayb, from Anas, and the wording given here is Bukhari's.In Muslim's version, from Qatada, he said, "I heard Anas say, 'The companions of the Messenger of Allah ﷺ used to sleep, then pray without performing wudu.'" He said, I asked him, "Did you hear this from Anas?" He said, "Yes, by Allah!"In Abu Dawud's version (200), "They would wait for the final night prayer until their heads began to nod, then they would pray without performing wudu."In another version of his, from Thabit, from Anas, he said, "The call to prayer for the night prayer was given, then a man said, 'I have something I need to attend to,' so the Prophet ﷺ stood conversing privately with him until the people, or some of the people, fell asleep, then they prayed."In Bukhari (642), "He kept him waiting even after the prayer had been called."Khattabi said, "There is a point of jurisprudence in this hadith, namely that sleep itself does not invalidate ritual purity. For if it did invalidate purity, it would do so under any circumstance, like all the other things that invalidate purity, where a small amount and a large amount, and an intentional occurrence and an unintentional one, are equal in nullifying purity. Rather, sleep is merely something that raises the likelihood of a purity-nullifying occurrence, since it is thought that such an occurrence may befall a sleeping person, in most cases..."