Anxiety is an excessive amount of worry. This can become so extreme, you may no longer wanted to drive a car, go in a crowded place, or even leave the house. If you already have a problem with anxiety, losing sleep and trying to make up for it by drinking caffeine will only make the issue so much worse. According to the National Sleep Foundation, it takes at least 6 hours for your body to go through half of the caffeine you consume. So, if you have an afternoon pick-me-up, there will still be caffeine lingering in your system well into the night.