Sleepwalk pissing. It's pretty common actually, you think you're walking to the bathroom but you don't get that far.
I actually have done this.
I woke up once wearing different clothes from when I fell asleep and had soiled them.
It was very embarrassing, and I have never told anyone about it.
As much as I sleepwalk, I'm glad it has only happened the once.