Oliver Sacks, who died on August 30, was a longstanding contributor of thirty essays to The New York Review of Books. His last published article, below, appears in the Review’s September 24 issue.

Walter B., an affable, outgoing man of forty-nine, came to see me in 2006. As a teenager, following a head injury, he had developed epileptic seizures—these first took the form of attacks of déjà vu that might occur dozens of times a day. Sometimes he would hear music that no one else could hear. He had no idea what was happening to him and, fearing ridicule or worse, kept his strange experiences to himself.

Finally he consulted a physician who made a diagnosis of temporal lobe epilepsy and started him on a succession of antiepileptic drugs. But his seizures—both grand mal and temporal lobe seizures—became more frequent. After a decade of trying different antiepileptic drugs, Walter consulted another neurologist, an expert in the treatment of “intractable” epilepsy, who suggested a more radical approach—surgery to remove the seizure focus in his right temporal lobe. This helped a little, but a few years later, a second, more extensive operation was needed. The second surgery, along with medication, controlled his seizures more effectively but almost immediately led to some singular problems.

Walter, previously a moderate eater, developed a ravenous appetite. “He started to gain weight,” his wife later told me, “and his pants changed three sizes in six months. His appetite was out of control. He would get up in the middle of the night and eat an entire bag of cookies, or a block of cheese with a large box of crackers.”

“I ate everything in sight,” Walter said. “If you put a car on the table, I would have eaten it.” He became very irritable, too, he told me:

I raged for hours at inappropriate things at home (no socks, no rye bread, perceived criticisms). Driving home from work a driver squeezed me on a merge. I accelerated and cut him off. I rolled my window down, gave him the finger, and began screaming at him, and threw a metal coffee mug and hit his car. He called the police from his cell. I was pulled over and ticketed.

Walter’s attention assumed an all-or-none quality. “I became distracted so easily,” he said, “that I couldn’t get anything started or done.” Yet he was also prone to getting “stuck” in various activities—playing the piano, for example, for eight or nine hours at a time.

Even more disquieting was the development of an insatiable sexual appetite. “He wanted to have sex all the time,” his wife said.

He went from being a very compassionate and warm partner to just going through the motions. He didn’t remember having just been intimate…. He wanted sex constantly after…