You are human and this struggle is common to just about all men; the timing of your temptation could easily have been related to the sperm count at a very high point.
Much like women who go through monthly cycles, men also have cycles. Sperm will increase until they are released or re-absorbed into the body, and your urges go along with that cycle. Wet dreams (ejaculation during sleep; usually in the context of a sexual dream) and non-sexual ejaculation is not uncommon when deliberate sexual ejaculation (orgasm induced) is absent.
After some weeks of not ejaculating from a deliberate orgasm, you may find that you will have a non-orgasm related release of sperm after urination. This is the body's way of dealing with the excess naturally when sex is absent.
My first efforts at real chastity when I was a younger man, unmarried, and more deeply converted and committed unveiled this surprise. God has designed, in nature, a way to deal with all our struggles.
So, do your best to avoid the practice of masturbation, stay away from porn, and understand your body often leads you this way just like hunger draws you toward food. You just have to wait until marriage to find the best outlet for your natural impulses.
Also, check out our FAQ section under this topic: