Weird question

So this is weird and ackward to ask. I have had 3 nights out of 5 to where I wake up needing to pee but it's almost too late. I almost wet the bed each of these nights. Literally had pee coming down my legs as I rushed to the bathroom. Anyone had this problem or know what could cause this? Doesn't feel like I have a uti, bladder, or kidney infection.