قرآن ﴿ أحل لكم ليلة الصيام الرفث إلى نسائكم هن لباس لكم وأنتم لباس لهن علم الله انكم كنتم تختانون أنفسكم فتاب عليكم وعفا عنكم فالآن باشروهن وابتغوا ما كتب الله لكم ﴾ البقرة ١٨٧
عبدالله بن كعب بن مالك عن أبيه قال كان الناس في رمضان إذا صام الرجل فأمسى فنام حرم عليه الطعام والشراب والنساء حتى يفطر من الغد فرجع عمر من عند النبي ﷺ وقد سمر عنده فأراد امرأته فقالت إني قد نمت قال ما نمت ووقع عليها وصنع كعب مثل ذلك فغدا عمر إلى النبي ﷺ فأخبره فنزلت الآية
لباب النقول في أسباب النزول للسيوطي
{ It is lawful for you to do things [rafth] with your women on the night of fasting; they are your clothing and you are their clothing. Allah has known that you have been betraying yourselves, and He has turned to you and forgiven you; so now have sexual relations with them and seek after what Allah has ordained for you } Al-baqara 187
Abdullah ibn Ka’b ibn Malik related that his father said: It used to be that during Ramadan, whenever someone would fast, stay into the night, and sleep, then food, drink, and women were prohibited for him until he broke the fast the next day. One time ‘Umar returned from chatting into the night with the Prophet (SAW), and he wanted his woman, but she said: Indeed I have slept already. He said: I have not slept. And he had sex with her. Ka’b did the same thing. And ‘Umar left early in the morning to go see the Prophet (SAW), and told Him about it, and the verse was sent down.
Al-Suyuti, Lubab Al-nuqul fi Asbab Al-nuzul [Seed Kernels on the Reasons for the Revelations]