© Andreykuzmin | Dreamstime.com
Caffeine is a naturally occurring substance found in coffee, tea, cola, and chocolate.  People use caffeine for the effects that it has on nerve cells of the brain. These effects include increased alertness, energy, and concentration. About two-thirds of daily caffeine consumption come from drinking coffee.  One eight-ounce cup of coffee can have about 100 to 200 milligrams (mg) of caffeine, which is more than double the amount in any other diet source. 
First, you’re probably wondering, what is grey matter in the brain? Grey matter is mostly made up of nerve cells called neurons. Neurons are mostly found in the outer layer of the brain called the cerebral cortex. This is the part of your brain responsible for complex functions. Neurons communicate with each other through nerve fibers called axons. Axons are coated with a white, fatty substance called myelin. The part of the brain where axons are most common is called white matter. 
How Does Caffeine Affect Your Neurons?
The main effect of caffeine comes from blocking a brain chemical called adenosine. When adenosine attaches to a neuron, it decreases the excitability of the neuron and decreases the release of stimulating brain chemicals like dopamine in the cerebral cortex.  An important function of adenosine is to slow down brain functions enough to make you sleepy at night. 
When you ingest caffeine, caffeine gets into your bloodstream and eventually into your brain. In your brain, caffeine binds to the same receptors on neurons that adenosine uses. Just one to three cups of coffee are enough to significantly reduce the effects of adenosine. The result is more energy, less sleepiness, and the stimulation that coffee drinkers are looking for. 
How Does Caffeine Affect Sleep?
The most common side effect of caffeine is loss of sleep, called sleep deprivation. The part of your brain that controls your sleep-wake cycle – your biological clock – is the most sensitive to caffeine. One to three cups of coffee may be enough to affect your sleep. The effects usually require more than 200 milligrams of caffeine.  You may have trouble falling asleep, have fewer hours of sleep, and have a less deep and restful sleep, called slow-wave sleep. [1,2]
Sleep deprivation may cause side effects like daytime sleepiness and problems with concentration or memory, called brain fog. These symptoms may cause you to drink even more coffee to stay awake and alert, making it harder to recover your lost sleep, leading to a vicious cycle. 
How long the effects of caffeine last vary from person to person depending on how sensitive they are to caffeine. Caffeine has a half-life of about three to seven hours. Half-life is the time that half of the caffeine’s effect has worn off by being removed from your system.  For most people the effects of caffeine last about six hours. 
Are There Other Brain Side Effects of Caffeine?
Low to moderate caffeine intake is between 50 and 300 mg. If you take in about 5 to 10 times that much, you may have a caffeine reaction that includes anxiety, restlessness, and a rapid pulse.  Another brain side effect can occur if you use caffeine for a long time and then stop suddenly. This can cause a caffeine withdrawal reaction that includes headache, fatigue, drowsiness, anxiety, and irritability. These symptoms can last up to one to two days. They can be relieved by taking caffeine. [1,2]
On the other hand, caffeine can also affect the brain in positive ways. It is effective as a headache medication, especially for migraine headaches. It may also reduce the risk of the brain disorder Parkinson’s disease and may reduce some symptoms of Parkinson’s disease. 
How Much Caffeine Is Safe?
According to the U.S. Food and Drug Administration (FDA), it is safe to take up to 400 mg of caffeine per day. That’s about four to five cups of coffee over a day. To avoid sleep deprivation, avoid caffeine for at least six hours before bedtime. Other tips for healthy sleep include getting daytime exercise, and not drinking too much alcohol. Keep your bedroom dark, quiet, and comfortable, and stick to a regular bedtime routine, going to bed at about the same time every night.