Morning erections and full bladders -- Correlation? Causation?

I find that when I constrict the muscles around my bladder to restrict the urge to pee, that has the effect of pushing blood into the penis (yes, I’m doing it now - picture the scene!). My WAG is therefore that as the need to pee increases, muscles constrict and the by-product is an erection. That’s why it doesn’t always happen.