Islam never overlooks human desires and instincts. In Islam, fulfilling the sexual desire is done through the marital relationship. Spouses should take care of each other’s sexual instinct and not to be away from each other for a long period without necessity.

Sheikh Ahmad Kutty, a senior lecturer and Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada, states the following: couples are best advised in the meantime that they’re away from each other to turn their mind away from lustful thoughts by occupying themself with other beneficial matters. They should ask Allah to help them. Here are some suggestions I can give in order to guard against falling into sins:

1. Make it a habit to read the Qur’an or listen to a beautiful recitation.

2. Practice remembrance of Allah (dhikr). Find a good prayer book such as Muhammad Al-Ghazali’sRemembrance and Prayer:The Way of the Prophet and read it regularly.

3. Learn to curb your carnal desires. Get Al-Ghazali’s book Disciplining the Soul and Breaking the Two Desires (translated by T.J. Winter).

4.Find good companions who will divert your attention to good things.
5. Find volunteer services that need help in your community and spend time volunteering your efforts.

By keeping your mind occupied with positive and beneficial things, with the help of Allah, you can guard yourself against sinful thoughts.

Finally, use the following prayer on a regular basis:

Allaahummatahhirqalbeewaahsinfarjee.

(O Allah, cleanse my heart (of all sinful thoughts) and help me to remain chaste and pure).

Rabbi qineesharrabasaree, rabbi qineesharrasam`ee; rabbi qineesharralisaanee, rabbi qineesharramaniyyee.

(My Lord, guard me against the evils of my eyes; my Lord, guard me against the evils of my ears; guard me against the evils of my speech; guard me against the evils of my private parts.)

Allaahummahabbibilaynaa al-imaanawazayyinhu fee quloobinaawakarrihilaynaa al-kufrawa al-fusooqawa al-`isyaana.

(O Allah, make faith dear to our hearts and embellish our hearts with it; and make disbelief, transgression and rebelli
on abhorrent to our hearts.)

Allaahummaaghninee bi halaalika `an haraamikawa bi ta`atika `an ma`siyatikawa bi fadhlika `ammansiwaaka.

(O Allah, make me self-sufficient with what You have declared as lawful for me; make me self-sufficient with Your obedience so that I am not driven to disobey You; and make me self-sufficient with Your favour so that I am not compelled to look to favours of others.)