You know how sometimes you wake up before you have to because you have GOT to pee? You pretty much have two options: Stay in bed and hope that you can sleep through it without waking up soaked in your own urine OR get up and pee. I typically get up and pee.
My theory is that when you do this, your bladder only expels as much as it needs to in order for you to be comfortable enough to get back to sleep. Because seriously, no matter when it happens, I STILL have to pee first thing when I get up. So unless I'm sleep-drinking, my bladder clearly isn't getting emptied that first time around.
This has been a random theory by yours truly. Have a good day!