even though the caffeine in coffee keeps you alert while you are awake, it doesn't always keep you from falling asleep when you are dead tired. some people can drink several cups of coffee before bed and still fall asleep with no trouble at all. others can't fall asleep after drinking even one cup of coffee before bedtime.
though coffee is known for keeping you awake and alert, it can also cause a peaceful state of mind. a peaceful state of mind relaxes you, allowing you to fall asleep. It seems to depend on whether your body wants to fall asleep or stay awake. even the ideas in a person's head seem to be a part of whether you sleep or stay awake.
>p/s:im belongs to this group-drink several mugs of coffee and still fall asleep with no trouble at all.never once i drink coffee and its make me stay awake when im sleepy.not for me! but i still like coffee.the purpose of coz not to stay awake.just a drink! ;)