TL;DR Certain studies show that caffeine can help ADHD treatment in various ways, including raising levels of dopamine (the hormone linked to pleasure, attention and movement), reducing blood flow in the brain (which calms overactivity in certain regions), and increases concentration. Caffeine can even complement certain ADHD medications. However, it's not applicable to everyone and certain precautions have to be observed when drinking caffeine in the context of ADHD.
Feeling antsy and hyperactive, being impulsive, and having short attention span are all telltale signs of Attention Deficit Hyperactivity Disorder or ADHD.
ADHD is usually thought of as a disorder in children, but people can have it even as an adult.
You might think the last thing you should take to treat it is caffeine, which is known toboost energy. But it may be just what the doctor could prescribe.
What is ADHD?
According to Healthline:
“Attention deficit hyperactivity disorder (ADHD) is a mental health disorder that can cause above-normal levels of hyperactive and impulsive behaviors. People with ADHD may also have trouble focusing their attention on a single task or sitting still for long periods of time.” 
The American Psychiatric Association adds that ADHD affects about 5 percent of children, with about half of them carrying it over into adulthood.  These numbers may even be higher in smaller communities based on estimates from Centers for Disease Control and Prevention. 
Because ADHD can affect your relationships and impact your day-to-day, it’s important to know the signs (and get help immediately): 
Procrastination or not being able to finish tasks or chores
Disorganization and lack of focus
Lack attention to detail
Can't remain on topic, difficulty listening and not following rules
Easily distracted by things that others don't notice, like noises in the environment
Fidgeting in their seat, talking excessively, getting up a lot, walking or running around
Always on the go while having trouble playing or working quietly
Interjecting answers out of turn, interrupting people, socially awkward
Impatience and not being able to wait their turn
Caffeine as an alternative ADHD treatment
It may be hard to imagine how caffeine, a stimulant, can be used as a potential treatment for ADHD.
But apparently it is. And certain studies put two and two together:
Caffeine helps ADHD by increasing dopamine levels
A study cited in the journal European Neuropsychopharmacology says caffeine may normalize dopamine levels and thereby improve ADHD patients' attention. 
When you have ADHD, doctors often prescribe stimulants to help you feel calm and alert, as well as improve memory and concentration. Caffeine can help deliver these things because it increases the level of dopamine, a hormone in your body linked to pleasure, attention, and movement.
Caffeine reduces blood flow to the brain
As a vasoconstrictor that makes blood vessels narrower, caffeine reduces blood flow to the brain. This is what’s common between caffeine and amphetamine medications that treat ADHD.
According to Healthline, “reduced blood flow may help treat ADHD by reducing the activity of brain regions that are overactive, allowing them to better function and cooperate with the rest of the brain.” 
Some studies have found that caffeine can boost concentration for people with ADHD. 
To be able to concentrate on work, a person needs to have ample levels of dopamine in the brain. People with ADHD, however, are observed to have unusually lower levels of dopamine.
Caffeine as a stimulant can make a world of difference among people with ADHD as it can get their dopamine levels just right.
However, this is more applicable to adults than children and teens.
Using caffeine with ADHD medications
Mixing caffeine with amphetamine medications such as Adderall (amphetamine and dextroamphetamine) can result insynergy, a powerful combination of two drugs leading to amplified effects.
Because of synergy, caffeine makes amphetamines more effective. However, the potential side effects can also be felt strongly.
Does caffeine make ADHD worse?
While caffeine has been considered effective as an ADHD treatment by the studies mentioned above, it’s not totally safe for everyone. The usage may depend upon a person's age, health status, and how severe their symptoms are. 
Here are the potential downsides of using caffeine to treat ADHD: 
How much is too much?Caffeinated products – whether food or drinks – have varying amounts of caffeine. Measuring the caffeine content in a product and knowing exactly how much to take in may be quite tricky. And in treating ADHD, precision counts.
Caffeine’s not enough.While proven effective, ingesting caffeine alone may not completely treat ADHD, especially those with severe cases. Medications prescribed by the doctor contain higher,controlleddoses of stimulants. Caffeine should NOT be used to replace medication itself.
Stimulant overload.Side effects are more likely to occur if a person goes overboard with stimulants, caffeine and medications combined. Stimulant overload may occur and increase the risk of adverse effects such as:
Loss of appetite
Anxiety and irritability
Shaking or tremors
Avoiding caffeine altogether.People with the following health conditions are advised to steer clear of stimulants:
High blood pressure
It's different for everyone
Some people may find caffeine to be effective in helping treat ADHD, while others may find no change at all (or even worse in unfortunate cases). Because of varying results, it's best to know your body's reaction to stimulants and consult a medical professional before mixing caffeine with prescription medicine.
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