It was a nocturnal emmision and it can happen even if you have regular sex and masturbate. I get them on occasion, not very often, but it has happened a few times even in my twenties. No big deal, just have to change your underwear and go back to sleep.