system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Why do some people have opposite reactions to caffeine and drowsy medicine?

My sister can drink coffee and energy drinks, and she'll fall asleep almost instantly, but drowsy medicine will keep her up. I always thought it had something to do with dyslexia...what's the real reason?
gpt
This is actually a fairly common occurence, especially with certain types of drugs, and it's often referred to as a "paradoxical reaction."

Diphenhydramine (Benadryl) is especially well known for having these sort of side effects; it will cause drowsiness for most users, but will cause hyperactivity in some patients. The reason for these paradoxical reactions vary from drug to drug and person to person, and can be complex (especially if they affect the brain).

Generally, these reactions are caused by genetic differences involving metabolic chemical processes or brain structure or chemistry or all three. 

Diphenhydramine hyperactivity, for example, is thought to be generally caused by the presence of an extra or altered copy of a gene for a metabolic enzyme (Im pretty sure its related to either CYP450 2D6 or 3A4). This mutation causes the body to sort of "over react" when that metabolic pathway is activated, which results in "ultra rapid metabolization" of all 2D6 substrates, including diphenhydramine (and a huge variety of other things, including chemicals which affect brain chemistry and mood).

This breaks down the diphenhydramine very quickly, and leaves the metabolic pathway in an excited state for some time. This ultimately changes brain chemistry and mood, temporarily. If you want the specifics, ask and ye shall receive.




Other "different reactions" can be caused by tolerance/exhaustion, or interactions with food and other drugs, and in some cases even mental state or environmental stimuli.

TL;DR / ELIactually5
Some people have different reactions to the same medicine. This happens because not everyone is the same. Sometimes two people can even have the exact opposite reaction!