Caffeine is used in both prescription and over-the-counter medicines to treat tiredness or drowsiness. Caffeine can also improve the effect of some pain medicine.