Muhammad bin Qays reported,

He said one day, "Shall I tell you about myself and about my mother?" We thought he meant the mother who had given birth to him, but he said, "Ayesha said, 'Shall I tell you about myself and about the Messenger of Allah ﷺ?'"We said, "Yes."She said, "On the night when it was my turn for the Prophet ﷺ to be with me, he came back and placed his cloak aside." She then mentioned the lengthy hadith found in the chapter on supplications for those in graves, which includes the following.She said, "What should I say to them, Messenger of Allah?"He replied, "Say, 'Peace be upon the inhabitants of these dwellings from among the believers and the Muslims. May Allah have mercy on those who have gone before and those who will come after, and we shall, Allah willing, be joining you.'"

Azami 3897

Sahih

عن محمد بن قيس بن مخرمة بن المطلب

أنه قال يوما: ألا أحدثكم عني، وعن أمي؟ فظننا أنه يريد أمه التي ولدته، قال: قالت عائشة: ألا أحدثكم عني وعن رسول الله ﷺ؟ قلنا: بلي، قالت: لما كانت ليلتي التي كان النبي ﷺ فيها عندي، انقلب فوضع رداءه- فذكرت الحديث بطوله الذي في باب ما جاء من الأدعية لأصحاب القبور وفيه-: قالت: كيف أقول لهم يا رسول الله فقال: قولي: السلام على أهل الديار من المؤمنين والمسلمين، ويرحم الله المستقدمين والمستأخرين، وإنا إن شاء الله بكم للاحقون.

الأعظمي 3897صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Funerals
Chapter
Visiting graves
Section
Recommendation to visit graves
Numbering
Jami al-Kamil 3897 (2nd edition)
Azami 3897