Upvote:4
Caffeine is a legal medication in the US, and caffeine pills are sold over-the-counter in every drugstore and supermarket with no prescription required (up to 200 mg per pill, I believe).
Pills generally are allowed in either checked or carry-on luggage. See https://www.tsa.gov/travel/security-screening/whatcanibring/all and search for "pills" or "medication". They don't fall into any prohibited category like sharp objects, explosives, or liquids.