Anas bin Malik reported,

We attended the funeral of the Messenger of Allah's ﷺ daughter, and the Messenger of Allah ﷺ was sitting by the grave. I saw his eyes filling with tears.He asked, "Is there any man among you who did not approach his wife last night?"Abu Talha said, "I did not."The Prophet said, "Then go down into her grave."So he went down into her grave and buried her.Ibn Mubarak reported that Fulayh said, "I think he meant sin."Abu Abdullah (Bukhari) said, regarding "that they may commit" [Anam 6:113], it means that they may earn.

Azami 3777

Sahih

عن أنس قال

شهدنا بنت رسول الله ﷺ، ورسول الله ﷺ جالس على القبر، فرأيت عينيه تدمعان، فقال: هل فيكم من أحد لم يقارف الليلة؟ فقال أبو طلحة: أنا، قال: فأنزل في قبرها فنزل في قبرها فقبرها. قال ابن المبارك، قال فليح: أراه يعني الذنب. قال أبو عبد الله (البخاري) {ليقترفوا} أي ليكتسبوا.

الأعظمي 3777صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Funerals
Chapter
Burial and its related matters
Section
Men assuming the lowering of the deceased into the grave even if it is a non-relative woman
Numbering
Jami al-Kamil 3777 (2nd edition)
Azami 3777