Zirr bin Hubaysh said that Laylat al-Qadr was mentioned in the presence of Sayyiduna Ibn Mas'ud (may Allah be pleased with him), and he said: Whoever stands (in night prayer) the whole of Ramadan will find it. The narrator said: Then I came to Madinah and mentioned this to Sayyiduna Ubayy (may Allah be pleased with him), and he said: "By the One in whose hand is my soul, I know which night it is: the night that the Messenger of Allah (peace and blessings be upon him) ordered us to stand in prayer." The narrator said: I asked him about that night, and he said: "The twenty-seventh night." Abdah said: "If the month was thirty days, we would stand (in prayer) for three nights after it, and if it was twenty-nine days, we would stand for two nights after it."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 9553