The Messenger of Allah ﷺ forbade that a man should come to his family like (an unexpected) night visitor doubting their fidelity and spying into their lapses. (Using translation from Muslim 715ab)
نَهَى رَسُولُ اللهِ ﷺ أَنْ يَطْرُقَ الرَّجُلُ أَهْلَهُ لَيْلًا أَنْ يَتَخَوَّنَهُمْ أَوْ يَلْتَمِسَ عَثَرَاتِهِمْ