Amy Wolfson knows sleep. An energetic woman with short, curly brown hair, the professor of psychology at the College of the Holy Cross serves on the board of the National Sleep Foundation, is the author of The Woman's Book of Sleep, and has spent much of her career studying sleep. When I met her in her office on the verdant campus on a hill overlooking Worcester, Massachusetts, she told me sleep is undervalued in American culture. "We spend at least a third of our lives asleep," she said, "but often we don't get enough sleep, and I'm interested in the ramifications of that."

Sleep disruption is a well-known side effect of caffeine use, but it is highly variable. Some people can drink coffee until the moment they turn in and sleep like babies. Others need to stop drinking caffeine by noon, or they will lie abed, gnashing their teeth, hearts thumping in their chests, thoughts racing. This brings us back to one of caffeine's conundrums: It is a fantastic drug for treating the symptom of sleepiness, but it can lead to increased sleepiness by interfering with sleep.

"Sleep researchers have been . . . I would almost use the word 'guilty,' of sometimes giving a confused message with regard to caffeine," Wolfson told me. "Caffeine is sometimes recommended as a sleep countermeasure, recommended for the military, recommended for pilots, recommended for train drivers, et cetera. I have colleagues that have devoted their careers to looking at countermeasures to sleepiness that aren't sleep.

"And then at the same time, you have the insomnia researchers that have for decades said, 'Oh, caffeine is a bad thing. For three to five hours before you are going to try to fall asleep, make sure you have caffeine out of your system.' For individuals who suffer from insomnia, they are given lectures in cognitive behavioral treatment programs to stay away from caffeine. So we have had a kind of love-hate relationship with caffeine. At least in the field of sleep research."

Wolfson told me she is especially interested in adolescents' caffeine use and the relationship between caffeine and a population of sleepy teens, which researchers are starting to scrutinize. In 2006, Maryland researchers found an association between caffeine use and adolescents who have trouble sleeping and feel tired in the morning. Wolfson and a colleague found a similar trend when they surveyed high school students about caffeine use. The students in a high-caffeine group – who took caffeine from coffee, energy drinks, and sodas – reported more daytime sleepiness, expected more energy enhancement from caffeine, and said they used it to get through the day.

Looking at younger caffeine consumers, a team of Nebraska researchers surveyed 228 parents and found that their five- to seven-year-old children drank approximately 52 milligrams of caffeine daily, and eight- to twelve-year-old children drank 109 milligrams daily. Those children who used the most caffeine slept fewer hours.

Wolfson believes the emergence of the new generation of energy drinks is related to a population of sleepy teens, and that excessive caffeine use by young people is part of a larger problem.

"I don't think that every person who stops at Starbucks on their way to work or Dunkin' Donuts, or, as we do in my house, brew our Peet's Coffee every morning, is necessarily sleep deprived," she said. "But there may be a group that is getting an inadequate amount of sleep, and probably a higher percentage of adolescents than adults, who are going to be at risk for gravitating toward those products."

Caffeine's sleep-disrupting properties are so reliable that researchers sometimes use it to induce insomnia in healthy subjects. And it does not take a whopping dose to affect sleep. Swiss scientist Hans-Peter Landolt used an electroencephalogram to measure brain wave activity in healthy subjects who took two hundred milligrams of caffeine (less than three SCADs) in the morning. By that night's bedtime, the morning caffeine was still affecting the subjects. The effects were small, and not severely sleep disruptive, but they were there. Bedtime reactions to caffeine may also hinge on stress—among people who are not insomniacs, caffeine has a stronger effect on those who are vulnerable to stress-induced sleep disturbance.

A team of California scientists found another variable in how caffeine affects sleep: chronotype. That term describes our time-of-day preferences. Some of us are morning people, often known as larks, while others are evening people, better known as owls. In a study of fifty university students consuming caffeine at will, who used wrist-activated motion detectors and sleep logs, the scientists found that morning people were most susceptible to caffeine's sleep-disrupting effects. They noted that the findings were limited by the group – all university students, mostly sleep deprived, and with relatively few morning people among them. Still, their 2012 paper was the first to report a possible association between chronotype and caffeine's effects on sleep quality, suggesting there is plenty of room for more research. Even though virtually all of us are aware of caffeine's effects on sleep, we often don't fully appreciate them. That is the message from a 2008 review of caffeine and daytime sleepiness. Authors Timothy Roehrs and Thomas Roth said that caffeine does not affect REM sleep, as other stimulants do, but decreases stages three and four sleep, which account for about 20 percent of our sleeping time and include some of our most restful, restorative sleep. "The risks to sleep and alertness of regular caffeine use are greatly underestimated by both the general population and physicians," they concluded. Again, there's that caffeine conundrum – should we use it to fight daytime fatigue or do without and see if our energy levels improve?

Sleeplessness can be troubling, but it's usually not debilitating. But caffeine can have more significant effects on the minds of those of us who are susceptible to it, by triggering anxiety. Anxiety itself is remarkably common. In any given year, forty million American adults will suffer from clinically significant anxiety, making it the most prevalent form of psychiatric disorder.

John Greden, of the University of Michigan, has written extensively on the link between caffeine and anxiety. He noted that while some people are more susceptible, too much caffeine can make almost anyone anxious. In a 1974 paper, "Anxiety or Caffeinism: A Diagnostic Dilemma," he wrote, "Relevant to this endeavor is the overlooked fact that high doses of caffeine — or 'caffeinism' — can produce pharmacological actions that cause symptoms essentially indistinguishable from those of anxiety neuroses."

Greden highlighted three cases he encountered while working at Walter Reed Army Medical Center. The first was a twenty-seven-year-old nurse who complained of lightheadedness, tremulousness, breathlessness, headache, and irregular heartbeat. She was first diagnosed with an anxiety reaction, related to her fear that her husband might be deployed to Vietnam. She was skeptical of this diagnosis, and after searching for a dietary cause, she figured it might be coffee.

RELATED: Ingesting pure caffeine powder maybe not as great an idea as it seems, says FDA. Read here

The nurse was able to trace her symptoms to when she bought a fresh-drip coffee pot. "Because this coffee was 'so much better,' she had begun consuming an average of 10 to 12 cups of strong black coffee a day—more than 1,000 mg of caffeine," Greden wrote. In this case, the cure was simple. Once she withdrew from coffee, nearly all of her symptoms vanished. For one week she was tired, then felt better and said she was "truly awake in the morning for the first time in years."

Another subject, an "ambitious 37-year-old Army lieutenant colonel," presented with chronic anxiety. He also complained of insomnia and loose stools. He drank eight to fourteen cups of coffee daily, plus three or four colas, and hot cocoa at bedtime. But he was unwilling to accept his diagnosis and "responded with incredulous cynicism" when informed that caffeine could be causing the problems. When the officer finally reduced his caffeine intake, his symptoms improved dramatically.

The last subject, a thirty-four-year-old army personnel sergeant who bragged of being "the first one in the office in the morning and the last one to go at night," presented with recurrent headaches. Tests showed significantly elevated anxiety levels. Greden wrote, "When questioned about his caffeine use he responded as if it were a reflection of his masculinity: 'I can easily put away 10 to 15 cups a day, I drink more coffee than anyone else in my office.'" Adding up his coffee, tea, cola, and headache medication, Greden calculated the patient consumed approximately fifteen hundred milligrams daily. This is a massive dose, equal to twenty SCADs. As with the others, when the patient reduced his caffeine consumption, his symptoms were almost completely alleviated.

Clearly, these are extreme examples. Most Americans top out at three or four cups of coffee daily. But they illustrate an important point. "From the clinical perspective, many individuals complaining of anxiety will continue to receive substantial benefit from psychopharmacological agents," Greden wrote. "For an undetermined number of others, subtracting one drug—caffeine—may be of greater benefit than adding another." So the ideal first-line treatment for anxiety in a patient who uses caffeine is to eliminate the caffeine and see how the patient responds, before prescribing antianxiety medication.

Greden later looked at how anxiety affects caffeine consumption. In a 1985 paper he noted that caffeine might contribute to anxiety in normal adults or psychiatric inpatients, but it is not likely a contributing factor for many patients with anxiety disorder. That is because "high anxiety appears to deter anxious individuals from high caffeine consumption."

So while high levels of caffeine make most people anxious, patients who suffer from anxiety disorder have probably figured this out and avoid the drug. Presciently, Greden left off with these words: "Caffeine should provide a pharmacological probe with which to study further the pathophysiology of panic and other anxiety disorders."

It also appears that habitual caffeine consumption may inure us to its anxiety-producing effects. In a study of more than four hundred people, looking at alertness, anxiety, and headache before and after they took 250 milligrams of caffeine (in two doses, ninety minutes apart) or a placebo, Peter Rogers found that even the subjects with a genetic predisposition to caffeine-induced anxiety developed tolerance to this effect, even if their regular daily consumption averaged just 128 milligrams, less than two SCADs.

All of caffeine's effects — from athletic and cognitive boosts to sleeplessness and anxiety — vary, depending on how quickly we process the drug. The half-life of caffeine in the human body is about four or five hours. That is the time it will take for the caffeine concentration to drop 50 percent. But this can be dramatically different from person to person. For women on birth control pills, it is twice as long; they will get double the kick from the same amount of caffeine. (Pregnant women, especially those in the last four weeks of their term, see this effect even more strongly. However, many women forego caffeine in pregnancy and would not experience this.) Smokers process caffeine twice as quickly; they will get half the caffeine kick as a nonsmoker. The effect also varies with body weight.

To understand these variables, it helps to imagine a couple. The man is a smoker who weighs 180 pounds. The woman is on birth control and weighs 135 pounds. If they sit down for a cup of coffee, she will get a caffeine effect that is nearly five times stronger — he will need five cups of coffee to equal her one. This is what I call the Mad Men Meets Sex and the City Effect.

I use Mad Men because people smoked like chimneys in the era glorified in that show. But American smoking rates have plummeted since, from just over 40 percent to just under 20 percent. Nonsmokers need half as much caffeine to get the same kick. Sex and the City applies to the 17 percent of American women taking birth control pills — they, too, need half as much caffeine to get the same kick. Both trends — fewer cigarettes and more birth control pills — have the effect of making every milligram of caffeine go a little further.

RELATED: Caffeine hallucinations: Why "Letters to the Editor" matter in science. Read here

The decline in coffee consumption has tracked with the decline in smoking and the rise in oral contraception. Although these lifestyle changes are not the primary cause of the decline in coffee drinking (there is no dearth of smoking guns), it is intriguing to think they might play a small role.

The mechanism at work in smokers and people on oral contraceptives is something called cytochrome P450 1A2, also known as CYP1A2. This is the primary enzyme we use to break down caffeine into its metabolites, accounting for some of the variability in how we metabolize caffeine (its cousin CYP2E1 also plays a role). The enzymes essentially reverse the last step that chemical companies take in manufacturing caffeine; they demethylate it into its metabolites, mostly paraxanthine (which also has caffeine-like effects), theobroine, and theophylline.

Pregnancy, oral contraceptives, and liver disease inhibit the enzyme, while smoking increases it. Strangely, vegetables in your diet can also play a role—cruciferous vegetables like broccoli can increase the enzyme activity, while apiaceous vegetables such as celery can reduce it. (Making things even more complex, women get a stronger enzyme response from the cruciferous vegetables than do men.)

In addition to the other variables in how we metabolize caffeine — including our size, acquired tolerance, smoking habits, use of oral contraceptives, and the amount of broccoli we put down — scientists are constantly learning more about how genetics influences the way we metabolize caffeine.

In a 2010 literature review, Amy Yang, of the University of Chicago, used twin studies to better understand the genetic basis of caffeine metabolism. Her review found that there is a strong genetic predisposition to caffeine preference and an especially strong genetic influence among those who use caffeine heavily (more than five cups of coffee per day in one study; greater than 625 milligrams daily in another). Yang also noted that genetics accounts for two of the best-known side effects of caffeine use. "Laboratory studies in human subjects show that susceptibility of some individuals to certain effects such as anxiety and insomnia can be accounted for by specific alleles of the [adenosine] receptors."

Being able to pin down a genetic aspect of sleep disruption helps to fill in a picture first sketched in preparation for the Chattanooga Coca-Cola trial. Writing in the journal Sleep, Hans-Peter Landolt noted that Harry Hollingworth had observed a few subjects who had no trouble sleeping after small doses of caffeine. Now, Landolt said, we can start to see the mechanisms that cause such variations. "One century after Hollingworth," he wrote, "pharmacogenetic studies of caffeine not only reveal insights into a distinct molecular contribution to individual caffeine sensitivity, but also indicate that A2A receptors are part of a biological pathway that regulates sleep in mammals."

Of the four types of adenosine receptors, two play leading roles. A1 receptors are the most widespread adenosine receptors in the human brain and are abundant in the cortex (cortical neurons are important for higher cognitive function). The A2A receptors Landolt refers to are more confined to areas deeper in the brain, in the basal ganglia, where they are involved with movement, motor learning, motivation, and reward.

Some people inherit a genetic trait that affects the way they metabolize caffeine. Specific individual genetic variants are known as single-nucleotide polymorphisms. That's a mouthful, so it is easy to see why scientists simply call them SNPs (pronounced snip). A gene known as ADORA2A regulates the A2A receptors. People who have a variant of this gene are far more susceptible to caffeine's effects. Yang wrote that one of these SNPs has outsize importance in caffeine-related psychiatric disorders: "The finding that the same SNP is associated with both caffeine-induced anxiety and panic disorder supports the observation that panic disorder patients are particularly susceptible to caffeine-induced anxiety and suggests that polymorphisms in the A2A receptor may influence both."

Regarding panic disorder, Yang is referring to research by the Brazilian doctor Antonio Nardi and his colleagues. Nardi was trying to better understand the mechanisms of panic attacks, using caffeine, as Greden had suggested, as a "pharmacological probe."

People who suffer from panic disorder have repeated, sudden panic attacks in which they feel they are losing control and that something horrible is happening. The attacks are transient, but they can be utterly debilitating. Often, the person will fear he or she is having a heart attack or is about to die. Panic attacks are remarkably common worldwide, afflicting about fifteen people out of every one thousand, and are twice as common among women.

For a study published in 2007, Nardi looked at three distinct groups of subjects. The control group comprised healthy people with no history of panic disorder. The second group included people with a history of panic disorder. The third group comprised first-degree relatives of the panic disorder group—parents, siblings, or children— who had no history of panic attacks.

Nardi gave all the subjects coffee or decaf made from instant Brazilian coffee. The caffeine content in the caffeinated coffee was high—480 milligrams per fifteen ounces (it likely included those caffeine-rich robusta beans). This would be equivalent to six Red Bulls, about forty ounces of moderately strong coffee, or twenty-four ounces of Starbucks coffee—more than six SCADs.

None of Nardi's subjects had panic attacks or increased anxiety after drinking the decaf. But 52 percent of the panic disorder patients suffered a panic attack after drinking the caffeinated coffee, while none of the control subjects did.

The unexpected finding was this: 41 percent of the first-degree relatives of the panic disorder patients also suffered panic attacks. These were people who had no history of panic attacks, and yet one strong dose of caffeine induced an attack.

In another study, Nardi fine-tuned the test. This time, he used the same 480-milligram caffeine challenge on four groups. In addition to a control group and a panic disorder group, he studied subjects with one of two types of common anxiety. One group had what is known as generalized social anxiety disorder (GSAD). This is a condition characterized by the fear of most social situations. The other group had performance social anxiety disorder (PSAD), which typically involves the fear of speaking, eating, or writing in public.

The results were similar to those in the first study. Nobody experienced a panic attack after drinking decaf, none of the control group ever experienced a panic attack, and 61 percent of the panic disorder patients experienced a panic attack after drinking the strongly caffeinated coffee. The new information came from the two subgroups of anxiety disorder. The performance social anxiety patients had more panic attacks after drinking caffeine than the generalized social anxiety patients— a lot more. Fifty-three percent of the former subgroup had panic attacks triggered by caffeine, versus 16 percent in the latter.

Nardi wrote that his research suggests the performance social anxiety disorder is biologically different than generalized social anxiety disorder and closer to panic disorder. Interestingly, it's a distinction clarified by caffeine.

Nardi was not the first to challenge panic disorder patients with caffeine. In other studies, they have illuminated hidden corners of the caffeinated brain.

In a 1993 letter to The American Journal of Psychiatry, three New York doctors wrote, "In the course of a study of the effects of caffeine infusion in sleeping panic disorder patients, generalized anxiety disorder patients, and healthy comparison subjects, we have observed the onset of olfactory hallucinations, promptly after infusion, in two of seven patients."

So, yes, this is a bit weird. First of all, the subjects were sound asleep when the researchers injected them with 250 milligrams of caffeine—four SCADs, or about as much as a twelve-ounce cup of Starbucks coffee or four Red Bulls.

One of the subjects, with no history of psychiatric disorder, woke up fourteen minutes after the injection. That is not surprising. Nor is it surprising that he felt shaky, and had rapid breathing and heartbeat— he'd been mainlining caffeine. What was surprising was that he reported an "interesting smell or taste—more like a smell."

This was the olfactory hallucination—sensing a smell that did not exist. And he was not alone. Another subject, with generalized anxiety disorder, awakened three minutes after the injection, "experiencing a smell like that of plastic or burnt coffee."

Curiously, yet another subject, who did have a history of panic disorder, experienced hallucinations including "dancing visual patterns and an undescribed sound."

Apparently, these three subjects got off light, getting ripped from their dreams by a mere 250 milligrams; another subject got a 500-milligram injection, also while sound asleep (which may have been unpleasant, but did not induce hallucinations). The doctors concluded, "The observations here suggest that further study of the adenosine system may add to our understanding of hallucination formation."

A case stranger still was reported in 2007 by a team of Greek researchers. Studying a thirty-one-year-old male with panic disorder, they gave him a 400-milligram caffeine challenge. The caffeine precipitated a panic attack, "characterized by severe anxiety, intense fear, jitteriness, accelerated heart rate, sweating, chest pain, dizziness, fear of fainting and/or dying, and an urge to escape from the experimental setting." That is a textbook description of a panic attack, not surprising after taking 400 milligrams of caffeine. The unexpected finding was the strange sensation that came just before the panic attack: "He reported a special type of auditory hallucination: he could hear vividly and repeatedly, in an echo-form, the last words of each thought he had. According to the patient's report, these hallucinations emerged suddenly—while he was in a state of minimal-to-moderate anxiety— and certainly preceded the panic attack by approximately 1-2 min, and became more intense while he was in a panic state. The patient strongly believed that he 'was going crazy,' but he did not proceed into any delusional elaboration of the hallucinations." The hallucinations lasted for about fifteen minutes. Within an hour, the ensuing panic attack had passed.

A team of Australian researchers looked more specifically at the link between auditory hallucinations and caffeine. In an experiment that studied the combination of stress and caffeine in a group with no psychiatric problems, the researchers' methods sound, perhaps, a bit stressful, depending on your tolerance for Christmas carols.

The subjects were divided into four groups: low caffeine/low stress, low caffeine/high stress, high caffeine/low stress, and high caffeine/ high stress. Stress levels were determined by a standardized perceived stress questionnaire, and the threshold for high caffeine use was set at more than two hundred milligrams per day (nearly three SCADs).

Subjects had to listen to Bing Crosby singing "White Christmas." Then they were told that the song, or a fragment of the song, might be embedded into a white-noise sample. They listened to white noise through headphones, and the researchers noted how many times the subjects heard the music. The catch is that the researchers never played "White Christmas" under the white noise. The high stress/ high caffeine group reported the most "false alarms"; they thought they heard the song even though it was not playing.

In their 2011 paper, the authors wrote, "The results demonstrated that high caffeine levels in association with high levels of stressful life events interacted to produce higher levels of 'hallucination' in non-clinical participants, indicating that further caution needs to be advised with the use of this overtly 'safe' drug."

Caffeine-induced hallucinations are mercifully rare. But researchers hope such accounts will help them understand the drug's actions at lower levels within the normal range for most Americans.

Beyond panic and hallucination, caffeine is, very rarely, associated with more extreme mental states. One case is recounted by Dr. Dawson Hedges, of Brigham Young University. In the journal CNS Spectrums in 2009, he wrote, "A 47-year old successful male farmer with no history of psychiatric hospitalization presented with a 7-year history of depression, diminished sleep to as little as 4 hours/night, poor energy, explosive anger, decreased concentration, decreased appetite, anhedonia [inability to experience pleasure], and feeling of worthlessness."

The farmer drank coffee, and plenty of it. Seven years before the doctor saw him he had increased his coffee intake from twelve cups to thirty-six cups daily. When Hedges first saw him, the patient was drinking a gallon of coffee every day. "There was no history of psychosis before the increase in coffee consumption, but after the increased consumption, the patient developed paranoia," Hedges wrote. The farmer felt that people were plotting to drive him away and steal his farm.

The farmer was also taking several antianxiety drugs: paroxetine, alprazolam, clonazepam, and propanol. And he had poor hygiene. But after tapering off coffee, he was a different man altogether. "Notably, the patient's psychosis resolved upon lowering caffeine intake, and no other features of schizophrenia or any other psychosis were present, sparing the patient from the potential adverse effects and cost of anti-psychotic medication," the author wrote. Hedges recommended that medical professionals consider caffeinism as a possible cause in patients with chronic psychosis.

In the most extreme cases, people have blamed caffeine for violent impulses. In Kentucky, Woody Will Smith killed his wife in 2009 by strangling her with an extension cord. He believed she was having an affair, and he used caffeine to stay awake so she could not sneak away with their children. He blamed the murder on sleep deprivation and caffeine intoxication. The jury did not buy it.

The caffeine-intoxication defense worked better for Dan Noble. The Idaho man went to a Starbucks store on a December morning in 2009 and bought two of his usual sixteen-ounce coffee drinks (on credit—he had no wallet and was clad in pajamas and flip flops). Then, he drove to nearby Pullman, Washington, in his gold Trans Am. Driving erratically, he hit one pedestrian in a crosswalk, then hit another a block later. Each of the victims suffered a broken leg from the collision. When the police arrived, they were forced to Taser Noble to subdue him.

Noble was acquitted on all charges, including vehicular assault. The reason? Insanity, caffeine induced. Noble's attorney said he had a "rare bipolar disorder, with caffeine as the final trigger." A condition of his acquittal: no more coffee.

And then there was Kenneth Sands, a Washington man who groped a woman and three teenage girls at a volleyball game in October 2011. He blamed his actions on caffeine-induced psychosis, but it did not get him off the hook. He landed a five-month jail sentence.

Some of these examples are quirky, and the acute caffeine-related psychological problems are rare. But the take-home message here is that caffeine can really mess with your head.

Image: Shutterstock