According to WebMD, caffeine can stay in the body as long as 14 hours. When a person consumes caffeine late in the day or early in the evening, he is likely to awaken multiple times during the night and receive less sleep overall.
It's best to avoid caffeine consumption for four to six hours before bedtime, advises WebMD. Caffeine, as a stimulant to the central nervous system, can create a minor physical dependence. Headaches, anxiety and fatigue are symptoms of withdrawal. Irritability and difficulty concentrating are also side effects. The body's dependence on caffeine usually lasts only a day or two.