Sayyiduna Jabir bin Abdullah (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings be upon him) forbade that a man should come to his house at night to catch his family in betrayal or theft, or to search for their faults. Sufyan said: I do not know whether «يخونهم» and «يلتمس عثراتهم»—did Muharib say this from himself or are these the words of the hadith?
Hadith Referenceسنن دارمي / من كتاب الاستئذان / 2667
Hadith Gradingتحقیق (حسین سلیم أسد الدارانی):إسناده صحيح والحديث متفق عليه، [مكتبه الشامله نمبر: 2673]
Hadith Takhrijاس روایت کی سند صحیح اور حدیث متفق علیہ ہے۔ دیکھئے: [بخاري 5243] ، [مسلم 184/715] ، [أبوداؤد 2778] ، [ترمذي 2712] ، [أبويعلی 1843] ، [ابن حبان 2713] ، [الحميدي 1334]
Brief Explanation
(Commentary on Hadith 2666)
In this hadith, the husband is prohibited from suspicion and spying, even though spouses are familiar with each other's temperament, disposition, and habits. Nevertheless, it is forbidden to suddenly arrive at night, because it is possible that the wife may be in a state that is unpleasant to the husband.
Secondly, the wisdom in informing before coming home is that during the day, the woman can adorn herself, clean herself, and maintain cleanliness, which brings comfort to the husband rather than disappointment. There are many other wisdoms as well, due to which suddenly entering the house at night has been prohibited.
However, if the family members are aware of the arrival at night, then there is no harm.