Depending on many things, a cat may stop spraying:

 Find out the reasons cats spray and get tips to help resolve the issue.
If a new person enters the household or if you have moved recently, your cat may start marking the area or objects associated with the new element in his/her life. Use these methods for cats who are spraying in response to something new in the environment:
Your cat may start spraying after seeing a strange cat through the window.
Any mature cat, depending on the circumstances, can spray. Typically, whole (unfixed) male and female cats will spray. Whole males are more likely to spray for territorial reasons and because it lets the receptive queens know they are available for a little hanky panky. When queens spray they are telling potential males in the neighborhood that they are ready for action. Fixing cats will stop cats from spraying in the majority of cases. You've given a perfect description of the typical scenario where a cat will spray urine.of How to Stop a Male Cat from Spraying was reviewed by  on February 3, 2017.of How to Prevent a Cat from Spraying was reviewed by  on April 19, 2017.
Cat spraying and urine marking are social, sexual and territorial behaviors. It's also how cats express extreme emotions such as frustration. Your cat is trying to tell you sometime. The primary cause of the spraying is your cat's insecurity in his territory.Has your schedule and therefore his routine changed drastically? Are you "seeing another cat" outside your home and bringing back its scent on your clothing? Moving into a new home or changes in the environment can cause a cat to spray. Previous occupants of your new home may have had a cat and your cat may be reacting to the smells that cat left behind.

All these things can cause a cat to spray or urine mark. Many people don't realize it, but both male and female cats can urine mark. Again, and I cannot emphasize this enough, the primary cause of spraying is your cat's insecurity in his territory. Help your cat increase his confidence and feeling of security. Give him tons of praise, affection and attention for simply breathing. Constantly reassure him that he is the most wonderful cat in the world. Play with him, massage him, talk to him, do everything to rebuild his self esteem.

When cats spray windows, doorways, fireplaces or any area where outside smells can enter your home, it's a sure sign that something out there is provoking it. It can be a tomcat, a female cat in season, maybe even a dog. Close off the windows so your cat can't see out. Maybe even just the sight of a perceived rival or threat is causing him to spray. In addition, place a few drops of your favorite perfume or aftershave by the window to mask out any scent that may be entering through the window. At the same time, your cat needs his confidence and security reinforced. Pay extra special attention to him and under no circumstance reprimand him for spraying behavior. You will only add stress to stress and worsen the problem. What your cat needs is reassurance and a sense of security from you, not your scorn.First, is he neutered? Generally, neutering prevents or stops spraying behavior in a cat, but it's not a 100% solution. Is your cat healthy? Have there been any social changes, like a roommate moving in or out? Is there a new cat or dog in the neighborhood that he perceives as a rival or threat? Is your cat being inadvertently "mistreated" in any way? Does your cat feel neglected?The sad thing is, though, that a litter box can be changed – when you’re dealing with cat spraying, it’s much more difficult to eliminate the lingering smell of cat spray. For many pet owners, this can turn into such a serious problem that they’re forced to surrender or give away their feline companion altogether.