system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Why can't we sleep when we're nervous? For example, the night before a big exam, the thing we need most is sleep.

Or before a new job, a marriage proposal, etc.
gpt
Our body only has one response when we are nervous: activate the fight or flight mechanisms by pumping adrenaline and other chemicals into our blood stream to make us more alert. The body doesn't differentiate if we are nervous because of a exam, a new job, a proposal, or a if there might be a large animal that can attack you at night in the woods.

The side effect of being more alert is that it's much harder to calm ourselves to sleep. Now that we're more civilized, there's a much lower chance that you're nervous about being in danger but the response still exists because it has kept our ancestors alive in dangerous times.