Sayyiduna Ka'b bin Malik (may Allah be pleased with him) narrates: In the month of Ramadan it used to be that when a man fasted and then slept after evening came, eating, drinking or intimacy with women became unlawful for him until he broke his fast the next day. One night Sayyiduna Umar (may Allah be pleased with him) returned from the Prophet (peace and blessings be upon him), having stayed up late with the Prophet (peace and blessings be upon him). He found that his wife had fallen asleep. He desired intimacy with his wife, and she said: I had fallen asleep. Sayyiduna Umar (may Allah be pleased with him) said: You had not slept. Then he was intimate with his wife. Sayyiduna Ka'b bin Malik (may Allah be pleased with him) also did the same. Then Sayyiduna Umar (may Allah be pleased with him) came to the Prophet (peace and blessings be upon him) and told him about this, so Allah Almighty revealed this verse: "Allah Almighty knows that you were betraying yourselves, so He accepted your repentance and pardoned you."
Ahmad recorded it. Its chain contains Ibn Lahi'ah, whose hadith is hasan (good), though he has been declared da'if (weak); the remaining narrators of this report are thiqat (trustworthy).
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب التفسير / 10847