Language:
كتاب النكاح
67  
Wedlock, Marriage (Nikaah)
(93)
Chapter: The decision of the Prophet (saws) not to share the beds with his wives and to stay away
(92)
باب هِجْرَةِ النَّبِيِّ صلى الله عليه وسلم نِسَاءَهُ فِي غَيْرِ بُيُوتِهِنَّ
Sahih al-Bukhari 5203

Narrated Ibn `Abbas:

One morning we saw the wives of the Prophet (ﷺ) weeping, and everyone of them had her family with her, I went to the mosque and found that it was crowded with people. Then `Umar bin Al-Khattab came and went up to the Prophet (ﷺ) who was in his upper room. He greeted him but nobody answered. He greeted again, but nobody answered. Then the gatekeeper called him and he entered upon the Prophet, and asked, "Have you divorced your wives?" The Prophet, said, "No, but I have taken an oath not to go to them for one month." So the Prophet (ﷺ) stayed away (from his wives) for twenty nine days and then entered upon them.

حَدَّثَنَا عَلِيُّ بْنُ عَبْدِ اللَّهِ، حَدَّثَنَا مَرْوَانُ بْنُ مُعَاوِيَةَ، حَدَّثَنَا أَبُو يَعْفُورٍ، قَالَ تَذَاكَرْنَا عِنْدَ أَبِي الضُّحَى فَقَالَ حَدَّثَنَا ابْنُ عَبَّاسٍ، قَالَ أَصْبَحْنَا يَوْمًا وَنِسَاءُ النَّبِيِّ صلى الله عليه وسلم يَبْكِينَ، عِنْدَ كُلِّ امْرَأَةٍ مِنْهُنَّ أَهْلُهَا، فَخَرَجْتُ إِلَى الْمَسْجِدِ، فَإِذَا هُوَ مَلآنُ مِنَ النَّاسِ فَجَاءَ عُمَرُ بْنُ الْخَطَّابِ فَصَعِدَ إِلَى النَّبِيِّ صلى الله عليه وسلم وَهْوَ فِي غُرْفَةٍ لَهُ، فَسَلَّمَ فَلَمْ يُجِبْهُ أَحَدٌ، ثُمَّ سَلَّمَ فَلَمْ يُجِبْهُ أَحَدٌ، ثُمَّ سَلَّمَ فَلَمْ يُجِبْهُ أَحَدٌ، فَنَادَاهُ فَدَخَلَ عَلَى النَّبِيِّ صلى الله عليه وسلم فَقَالَ أَطَلَّقْتَ نِسَاءَكَ فَقَالَ ‏ "‏ لاَ وَلَكِنْ آلَيْتُ مِنْهُنَّ شَهْرًا ‏"‏‏.‏ فَمَكَثَ تِسْعًا وَعِشْرِينَ، ثُمَّ دَخَلَ عَلَى نِسَائِهِ‏.‏
Reference : Sahih al-Bukhari 5203
In-book reference : Book 67, Hadith 137
USC-MSA web (English) reference : Vol. 7, Book 62, Hadith 131
  (deprecated numbering scheme)