Perhaps your parents decided to get you out of you sleep clothes and started with your pants. Then they realized you had a boner and it was all sorts of awkward, so they absconded.
Or maybe you just didn't have the button on very well and it came loose while you were sleeping. Any shifts in your sleep could have slowly unzipped your pants a little at a time until they were fully unzipped. Then you got morning wood.
Or the most likely explanation is that you were so tired, you didn't realize you were taking off your pants and fell asleep right before you were planning on taking them off. Then you got morning wood.
I'm a pretty restless sleep and tend to twist and turn a lot in my sleep. If I go to sleep with socks on, they'll be off when I wake up. I'll also find that I've twisted my pants or shirt tight against my body because I was rolling too much. I've even woken up with my shirt around just one of my arms because I slid down in my bed the friction pulled it over my head and arm.