Epididymal hypertension is the medical term for the achy feeling from sexual buildup without release. To understand it, one must first understand the boner. Long story short, it all comes back to blood flow.
For a G-rated demonstration of how it works, wrap a piece of string around the tip of your finger. You can expect your finger to swell a little, turn red, and feel warm and achy under pressure. The effects on a penis are just a little bit more severe than this.
See, penises have a pair of spongy chambers called corpora cavernosa — which translates to “hollow-containing bodies”— and erections are the result of those spongy chambers filling up with blood. This happens when smooth muscle tissue in penile arteries relaxes and allows more blood in. In other words, penises are hydraulic and erections are the result of blood pressure.
As arousal continues, different smooth muscles contract to pick up semen and accumulate it below in a structure at the base of the urethra called the urethral bulb. The urethral bulb can swell two to three times its size as contractions keep ferrying in semen. This means more pressure sometimes visibly turns the balls a darker colour.
Without the release of orgasm, that pressure’s a lot for a body to handle. While the muscles will eventually relax to let the blood back out and the body will eventually reabsorb the semen, sometimes that pressure results in pain. Sometimes, that pain is intense. Discounting Urban Dictionary, not a lot of medical research has been done of the nature of the pain. Counting Urban Dictionary, sources say that it’s a similar sensation to being kicked in the balls with pain affecting your stomach as well as your jewels. It can be mild to severe to “excruciating.”
It also doesn't only affect male bodied people. Women also can experience pain from extended arousal. As the Unbreakable Kimmy Schmidt puts it, it's like “your crotch gets a headache.” But as with many many things sexual, it happens to varying degrees. Not every headaches is a migraine.
The most effective treatment? Duh. Release the pressure. Obviously, it's never an excuse to turn that pressure on a partner, but masturbation can come through for you if a partner leaves you feeling blue. If that’s too much to handle, hot or cold compresses and sleep are both on the table. They might not treat the issue at the source, but grinding against an ice pack can probably take your mind off most things at least.