On two very memorable occasions I’ve dreamed that I was taking a wazz and have woken up in panic to find myself wetting the bed
Had exactly this when I was younger!
Now I have an inbuilt trigger that means when I dream about having/needing a wee my concious brain kicks in, and I become aware that I’m dreaming that I’m weeing and that I know that means I need an actual wee, so I wake up 😯
So basically somehow my brain has wired itself so that if I need a wee in the night, it makes me dream about needing a wee, then double bluffs itself, bullies it’s way into my dream to tell me to wake up so that I can go for a wee!