If a man lives alone, and knows that he will be tempted at church around women (especially in today's ungodly American culture where women wear miniskirts to church), he would be wise to masturbate before going to church, to remove that urge which will make him uncomfortable at church. I think that is wisdom.
I was sitting in church one Sunday morning, and a young woman came and sat beside me. She seemed about 18. For some reason she kept crossing her legs, dozens of times throughout the church service. She was wearing a skirt which revealed a portion of her thighs. She crossed her legs so much that I still sincerely think she was deliberately trying to seduce me for some reason. It made me uncomfortable, but I was able to ignore her because of what I just told you. Had I not been prepared for her, I would have had to leave the service in great discomfort. Women don't understand how rough men have it, they really don't.
And sadly, some of them do know, and they enjoy watching men squirm in agony. Proverbs 6:26, “For by means of a whorish woman a man is brought to a piece of bread: and the adulteress will hunt for the precious life.” For some women, teasing men sexually is a sport to them, covering their home wall with the stuffed mantles of lions, tigers and men!