Asim bin Sufyan narrates that he heard Sayyiduna Abu al-Darda' (may Allah be pleased with him), or perhaps Sayyiduna Abu Dharr al-Ghifari (may Allah be pleased with him), say: "I asked the Prophet (peace and blessings be upon him) for permission to spend the night at his door, so that he could wake me if he needed something. He gave me permission, and I spent the night there."
Al-Bazzar recorded it, and its narrators are thiqat (trustworthy).