system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Why do some people throw up when in extreme pain and why do they feel a little better after vomiting?
gpt
You have discovered the Adrenal response!

Have you ever tried to run with a full stomach? If you are in extreme pain you bodies adrenal system thinks you are in danger and starts to ramp up. This means doing all kinds of things, but one of them is to dump anything that would hurt your ability to run away.

(The degree to which the adrenal response causes this varies based on a person's personal body.)

Why do they feel better?
Now we are at the root of it. The way the adrenal system causes you to vomit is by causing spasms in your stomach (not unlike a sneeze). Once you vomit the spasms stop and you feel better.