Marriage is generally considered as a commitment of loyalty, emotional stability and common responsibility. But simple rules are not always followed by human thoughts and emotions even in the stable relations. Psychologically, once a married man cannot help but think about another woman, the motives are usually more complex and dependent on mental, emotional, and situational reasons and not the impulse control or superficial attraction.
Emotional Novelty: The Reward System of the Brain

Human brain is programmed to perceive something new as new things activate the reward system and cause a focus and curiosity enhancing chemicals. The presence of a new face in an established routine is enough to make it possible that a person might experience the opposites of an actual feeling of intense and persistent thoughts without conscious effort.
Unrealized Emotional Needs In the Marriage

Psychological studies indicate that whenever a person experiences lack of fulfillment of emotional needs like appreciation, validation or understanding, the mind tends to be attracted towards an individual, which is believed to offer such characteristics. It is not really about the other woman in most cases but what she is emotionally at that moment.
The Power of Idealization

The mind is useful in filling various gaps with positive assumptions that form an image that is more ideal than what is actually happening. Everyday marriage life contains some stress and duties and, therefore, a stranger might appear simple and perfect.
Escapism Routine Responsibilities

Marriage also involves mutual responsibilities which in some cases do not look like a calming fact like in moments of stress economics on work or in family matters. The mind can become something to think about when a person is feeling pressure, as it is a temporary mental reprieve to the pressure which gives one a feeling of lightness, unlike day-to-day stress.
Ego Enforcement and Confirmation

The fact that someone has taken notice of or admired you can be of great confidence of self-esteem especially in those times when one has low confidence. This confirmation can form a vicious cycle where the mind goes over and over again to the same cause of those positive feelings.
Cognitive Intrusion and Rumination

As soon as a thought is emotionally charged, the brain can repeat it over and over again and it is called rumination. The harder an individual tries to silence the thought the more intractable it may become and it can of itself become uncontrollable at a time when the person involved may not want such a thought to control his mind.
The questions of Midlife Reflection and Identity

At some stage of life, especially at the middle age, one tends to analyze what he has done, made decisions and how he is developing. Meeting a person who is a model of the other journey or a wasted second chance can create a mix of curious and nostalgic reflection.
Shared Experiences (Sharing) Lead to Emotional Transference

In instances where two individuals are having substantial communication with each other or working jointly on a project, emotional energy is naturally formed during the reoccurring interaction. Even though that original connection may have been a situation, the brain can attach greater new meaning to that shared experience.
Stress and Search for Relief

Experiencing a high degree of stress control leads to the loss of emotional control and the wish to get comfort or distracted. When another woman is related to the quiet talks or favourable interactions, the brain might be associated with her presence as relief manner.
The Contrast Effect of Long-Term Relationships

With time, recognition has the capability of dampening emotional reactions in a long-term relationship. Contrarily, a new individual might seem to be more interesting merely due to the fact that the brain reacts aggressively when exposed to new qualities and opinions.
Fantasy as a Psychological Projection

Persistent thoughts are sometimes not so much about a real-life person you are suppose to think about but about an ideal version of yourself based on what you would like or can not have. The unfulfilled desire can be projected onto someone else, which creates the mental story, which is believable to the mind but not the actual reality.