حَدَّثَنَا عَبْدُ اللَّهِ بْنُ مَسْلَمَةَ، عَنْ مَالِكٍ، عَنِ ابْنِ شِهَابٍ، عَنْ أَنَسِ بْنِ مَالِكٍ، أَنَّ النَّبِيَّ صلى الله عليه وسلم قَالَ ‏"‏ لاَ تَبَاغَضُوا وَلاَ تَحَاسَدُوا وَلاَ تَدَابَرُوا وَكُونُوا عِبَادَ اللَّهِ إِخْوَانًا وَلاَ يَحِلُّ لِمُسْلِمٍ أَنْ يَهْجُرَ أَخَاهُ فَوْقَ ثَلاَثِ لَيَالٍ ‏"‏ ‏.‏
Translation
Abu Hurairah reported the Messenger of Allah (May peace be upon him) as saying

Abu Dawud said: The Prophet (ﷺ) kept apart from some of his wives for forty days, and Ibn 'Umar kept apart from his son till he died.

Abu Dawud said: If keeping apart is meant for the sake of Allah, then it has no concern with it. 'Umar bin 'Abd al-'Aziz covered his face from a man.