Yup a wet dream is just your bodies way of naturally releasing built up semen if it isn't being released through masterbation or sex.

I had a few when I was younger, the first time I thought I pissed myself. The few other times it happened I just fell back to sleep and cleaned myself off in the morning.