Depending on your body’s sensitivity to caffeine, which is determined by your genes, coffee can either keep you awake or not have much effect at all. Researchers have found several genes that affect a person’s sensitivity to caffeine.
“These genes have to do with the enzymes that break down caffeine in the liver, as well as receptors in the brain that are affected by caffeine.” Also, some medications can interfere with a person’s sensitivity to caffeine. If you are sensitive to caffeine, another reason why it may keep you awake is that it takes about 6 hours for one half of the caffeine you have consumed to be eliminated from your body.