Not jerking off actually builds motivation / energy / focus...it's because dopamine re-balances...too much masturbation depletes dopamine, dopamine the main chemical for motivation
Go a month without masterbation and you will be more motivated, guaranteed.
The neurotransmitter dopamine is released during and after masturbation, thus which would drive someone to be more motivated. It is also a reward driven neurotransmitter, so someone would most likely go after their goal, because the dopamine would help them see the reward after the work. - In which the example you gave, I believe not masturbating OR given any sexual stimuli which would result in arousal, would increase alertness.
So, masturbation wouldn't really deplete dopamine synaptic transmission in the brain.

If anything, it'll elevate levels.
I think maybe too much sexual stimuli (for those who don't know, stimuli would be something that would influence activity, such as porn, sex, food, water, even a thought etc.) would flood the brain in dopamine, thus being too reward-driven, resulting in taking too many risks...
I'm a behavioral neuroscience student (and computer and information security), and a COMPLETE nerd when it comes to the brain and behavioral biology.
