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)
أَنَّهُ قَالَ نَهَى رَسُولُ اللهِ ﷺ أَنْ يَطْرُقَ الرَّجُلُ أَهْلَهُ لَيْلًا