Caffeine blocks the action of neurotransmitter adenosine which is responsible for the buildup of sleep pressure. As time goes on when you are awake, you accumulate more and more adenosine and the sleepier you get. When sleep arrives, an enzyme called adenosine deaminase breaks down the adenosine.
One genetic component that affects sleep is how efficient this enzyme breaks down adenosine. There is also a difference in people ability to break down caffeine.