Hello, I can understand the distress you are through. Your of discharge of semen during sleep is suggestive of a condition called premature ejaculation. The threshold for ejaculation is short and spontaneous discharge during night is very common presentation. Most, importantly with suitable medication and instructions it can be completely cured.
Next Steps
I would suggest you to consult with a sexologist.