Practice, practice, practice ... then practice some more. In my youth, I masturbated to ejaculation and orgasm at least two times prior to going to sleep on a daily basis. I still masturbate daily prior to falling to sleep, but not always to the point of ejaculation. Maintaining my erection's firmness has been my goal, and over many years of practice I'm capable of maintaining my erection through edging for an hour. With piss breaks, I've been able to keep myself stimulated for close to 4 hours without ejaculating. My wife was surprised one night last week when she jacked me for 3 hours, and I didn't ejaculate until after we copulated for another 20 minutes.