The Book of Marriage
Ṣaḥīḥ Muslim 3409
إِذَا أَحَدُكُمْ أَعْجَبَتْهُ الْمَرْأَةُ فَوَقَعَتْ فِي قَلْبِهِ فَلْيَعْمِدْ إِلَى امْرَأَتِهِ فَلْيُوَاقِعْهَا فَإِنَّ ذَلِكَ يَرُدُّ مَا فِي نَفْسِهِ
idhā aḥadukum aʿjabathu al-marʾah fawaqaʿat fī qalbihi falyaʿmid ilā āmraʾatihi falyuwāqiʿhā fa-inna dhalika yaruddu mā fī nafsihi
Transliteration generated from the Arabic vowel marks
The full narration
Jabir heard Allah's Apostle (ﷺ) say:When a woman fascinates any one of you and she captivates his heart, he should go to his wife and have an intercourse with her, for it would repel what he feels
Source
Ṣaḥīḥ Muslim · 3409
Ṣaḥīḥ