Silence provides a condition of rest and prayer, but also an occasion for distraction and conflict. Keep your heart focused on God and the door to your heart secure. Be attentive so that your mind does not wonder off into temptation.
If a tempting thought presents itself, disregard it. If you pay attention to it, you are beginning to unlock the combination lock on the door by your own actions. If you begin meditating on the tempting thought, then you move toward considering acting on the thought. If you continue entering the combination numbers to the lock by taking one step at a time toward accepting the temptation, you open the door for sin to enter. Do not allow the enemy to convince you to open the locked defensive door from the inside.
Do not allow despair over tempting thoughts to take root. Spend no time wondering why you are having bad thoughts or attempting to psychoanalyze yourself. Simply, reject the thought quickly and return your focus to prayer.
Read: Proverbs 4.23-27; James 1.12-15