In a report published in the Journal of the International Society of Sports Nutrition in 2010, experts find that caffeine stimulates our central nervous system. This makes our exercise and workout routine feel less painful and rigorous. 
In a high-intensity workout – say HIIT exercises and resistance training, caffeine can even increase the number of muscle fibers that get involved in muscle contractions. This makes our movements become more powerful. It can also help us endure more reps!
Essentially, caffeinated beverages can help “promote endurance and a lower rate of perceived exertion (RPE) during exercise.” 
How to take caffeine before working out?
How long before the work out should you have it? When do the effects peak?
Reports vary, but the range you’re looking at is somewhere between 30 and 90 minutes.
Some studies show that the peak of your caffeine hit goes roughly 45 minutes after consumption. 
It’s safe to say that you should have your cup of joe or a pop of caffeine mint an hour before you hit the weights or start doing your sun salutations.
Here’s the thing. You can apply the timing above… as long as it’s NOT AT NIGHT.
As a general rule of thumb, you should steer clear of caffeine 6-8 hours before you hit the hay. Otherwise, you can say hello to sleepless nights and interrupted sleep.
How long does caffeine’s effect last:
If you’re planning to work out in the next two hours or so, then here’s some good news.
A caffeine fix before heading to the gym can power you through the entire workout. And as a bonus, you won’t feel drained; none of that huffing and puffing mess!
How much caffeine do you need:
We’re talking quality over quantity here.
A common misconception about caffeine is that the more you take it, the more benefits you get.
But it’s more of like – the more you take it, the more jitters you get!
It’s good to stick to small doses pre-workout.
According to Active.com, “about 3 milligrams of caffeine per kilogram of body weight” is more than enough.  That’s equivalent to a regular cup of coffee or 1-2 pops of Viter Energy Mints.
You can also have any forms of caffeine pre-workout – whether it’s a cup of coffee, caffeine pill, warm tea, or Diet Coke (hope this is your last option though!)
What about during and post-workout?
During a Workout:
Can you really drink coffee while working out?
If we’re to see someone downing a cup of Starbucks in the gym, that’s just plain weird.
The jury’s still out on this one.
It’s likely to bring about reduced perceived exertion as a key benefit. But if you want to experiment with it, you can stick to low levels of caffeine – around 20 to 50 mg.
After a Workout:
While there’s no report validating the benefits of caffeine post-workout, some experts believe that the stimulant can aid in muscles replenishing their glycogen stores. This helps with muscle recovery and get your body more ready for the next workout.
If you were to try this, have as much caffeine as before the workout – around 3 to 6 mg of caffeine per kg of body weight.
If you want to know more, here’s a video by Bodybuilding.com on why caffeine makes workout better.
Erectile dysfunction. In combination, those are two of the ugliest words known to man. But can caffeine help you get it up?
Science hasn't found the definitive answer to this question, but one study concluded that fewer men who consume caffeine have problems performing. The study said:
Caffeine intake reduced the odds of prevalent ED, especially an intake equivalent to approximately 2-3 daily cups of coffee (170-375 mg/day). This reduction was also observed among overweight/obese and hypertensive, but not among diabetic men. Yet, these associations are warranted to be investigated in prospective studies