system
Given the following post, respond as if you're commenting on Reddit:
human
Why do I get erections when I'm tired?
gpt
When a male gets sexually stimulated (either physically or mentally), nerve impulses are sent to a place near the base of the spinal cord called the erection center. Nerves passing from the erection center to the penis supply a return impulse that causes the release of a substance called acetylcholine which causes the arterioles (small arteries) in the erectile structures to dilate, or widen. At the same time, muscles surrounding the veins near the base of the penis contract, restricting the amount of blood that leaves the penis. As a result, the erectile structures begin to fill with blood and expand. As they expand, the penis as a whole begins to enlarge and harden.

Even though the erection center in the spinal cord is responsible for the actual erection, the brain is definitely involved, too. The brain can send signals directly to the erection center and cause it to kick into action, which is why looking at an exciting picture can cause an erection. The brain can also inhibit erection, too. The nervous system contains two sub-systems — the sympathetic nervous system and the parasympathetic nervous system. The sympathetic is responsible for such things as fear, the "fight or flight" reaction, and ejaculation; meanwhile, the parasympathetic is responsible for calming and getting things like the digestive muscles to operate. The parasympathetic system is also responsible for causing erections. Since these two systems operate against each other, fear — or an orgasm — can inhibit erections. This is why you tend to lose your erection after ejaculation: orgasm is a big event for the sympathetic nervous system, so when it occurs it basically knocks out the parasympathetic system for a while, causing your erection to go down. It's also why impotence (the inability to get an erection on demand) is such a problem in some men — if they get anxious that they won't be able to perform sexually, their sympathetic nervous system dominates, actually making it more difficult for them to get an erection. So, the key to getting an erection is to relax.

**TL;DR** **As you become tired, your parasympathetic nervous system (rest/recover system) kicks into gear and your spinal cord signals your penis to fill with blood**