Why coffee keeps you awake?
It is well-known that the effect of coffee on mood is related to its content in caffeine.
But why caffeine has such a strong effect on us? Caffeine operates using the same mechanisms of amphetamines, cocaine, and heroin to stimulate the brain, though with milder effects. It manipulates the same channels as the other drugs, and that is one of the things that gives caffeine its addictive qualities.
There is a chemical in our brain called adenosine, that binds to certain receptors and slows down nerve cell activity when we are sleeping. To a nerve cell, caffeine looks like adenosine and it binds to the adenosine receptors. However, as it's not really adenosine, it doesn't slow down the cell's activity like adenosine would. So the cell cannot "see" adenosine anymore because caffeine has taken up all the receptors adenosine binds to. Then instead of slowing down because of the adenosine level, the cells speed up.
The pituitary gland sees all of this activity and thinks some sort of emergency must be occurring, so it releases hormones that tell the adrenal glands to produce adrenaline. Adrenaline is the "fight" hormone, and it makes your heart to beat faster, the breathing tubes to open up, the liver to release sugar into the bloodstream for extra energy and your muscles to tighten up, ready for action. Because of this, after consuming a big cup of coffee your muscles tense up, you feel excited and you can feel your heart beat increasing. Moreover, as amphetamines, caffeine also increases the levels of dopamine, which is associated with the pleasure system of the brain, providing feelings of enjoyment and reinforcement.