I was only able to do that in a highly horny state while exercising. I was outside, alone completely naked with a raging hardon. It was the suburbs though, so the idea someone could watch was really turning me on. I started doing push-ups then moved on to pull-ups. By the time I was doing pull-ups, I was leaking pre like a faucet. It was actually a really good workout, and by the time I was at 18-20 pull-ups I was so impressed with myself (ha!) I just exploded everywhere. It was actually a really intense orgasm that went on for a long time and was intensified as I used my abs and kiegels (?) and lifted my legs up and out at the same time as I pulled up.
I've also seen a video of a way more flexible guy that almost does the splits and raises his whole body off the ground like a gymnast. Then as you watch he gets an full on erection and orgasm.
I bet the idea of showing off helped both me and him