Bara bin Azib reported,

The companions of Muhammad ﷺ used to observe the following practice. If a man was fasting and the time to break the fast arrived, but he fell asleep before eating, he would not eat that night nor the following day until evening came again.Qays bin Sirmah al-Ansari was fasting, and when the time to break the fast arrived, he came to his wife and asked her, "Do you have any food?"She replied, "No, but let me go and find some for you."He had been working all day, so his eyes overcame him and he fell asleep. When his wife came back and saw him, she said, "What a disappointment for you!"By midday the next day, he fainted. This was mentioned to the Prophet ﷺ, and so this verse was revealed, "It has been made permissible for you on the night of fasting to have relations with your wives" [Baqarah 2:187]. They rejoiced greatly at this, and there was also revealed, "And eat and drink until the white thread of dawn becomes distinct to you from the black thread" [Baqarah 2:187].

Bukhari 1915

Sahih

حدثنا عبيد الله بن موسى عن إسرائيل عن أبي إسحاق

عن البراء رضي الله عنه قال

كان أصحاب محمد ﷺ إذا كان الرجل صائما فحضر الإفطار فنام قبل أن يفطر لم يأكل ليلته ولا يومه حتى يمسي وإن قيس بن صرمة الأنصاري كان صائما فلما حضر الإفطار أتى امرأته فقال لها أعندك طعام قالت لا ولكن أنطلق فأطلب لك وكان يومه يعمل فغلبته عيناه فجاءته امرأته فلما رأته قالت خيبة لك فلما انتصف النهار غشي عليه فذكر ذلك للنبي ﷺ فنزلت هذه الآية {أحل لكم ليلة الصيام الرفث إلى نسائكم} ففرحوا بها فرحا شديدا ونزلت {وكلوا واشربوا حتى يتبين لكم الخيط الأبيض من الخيط الأسود}

البخاري 1915صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Fasting
Chapter
Allah's saying, "Permitted to you on the night of fasting is intimacy with your wives. They are a garment for you and you are a garment for them. Allah knows that you used to deceive yourselves, so He turned to you in forgiveness and pardoned you. So now have relations with them and seek what Allah has decreed for you"
Numbering
Darussalam 1915
Bukhari 1915