Hello, I can understand the distress you are through. Thus problem is suggestive if a condition called as premature ejaculation. The threshold for ejaculation is short and often cause spontaneous discharge during night. With suitable medications and instructions it can be completely cured.
Next Steps
I would suggest you to consult with a sexologist. For more information regarding this problem you can ask a detailed query here on practo.
Health Tips
Don't worry. It is treatable.