Some men among the companions of the Messenger of Allah ﷺ were shown Laylat al-Qadr in their dreams during the last seven nights. The Messenger of Allah ﷺ said, "I see that your dreams agree about the last seven nights. So whoever wishes to seek it, let him seek it in the last seven nights."Wazad in another narration that some people were shown that it falls within the last ten nights.
أن رجالا من أصحاب رسول الله ﷺ أروا ليلة القدر في المنام في السبع الأواخر، فقال رسول الله ﷺ: إني أرى رؤياكم قد تواطأت في السبع الأواخر، فمن كان متحريها فليتحرها في السبع الأواخر. وزاد في رواية: أن أناسا أروا أنها في العشر الأواخر.
Malik narrated it in itikaf (14) from Nafi, from Ibn Umar, and mentioned it as above. Bukhari narrated it in the merit of Laylat al-Qadr (2015), and Muslim in fasting (205:1165), both through Malik with the same wording. Bukhari also narrated it in interpretation of dreams (6991) through Ibn Shihab, from Salim bin Abdullah, from Ibn Umar, containing the addition mentioned.