The accidental breakthrough came during an experiment originally intended to suppress the obese man's appetite, using the increasingly successful technique of deep-brain stimulation. Electrodes were pushed into the man's brain and stimulated with an electric current. Instead of losing appetite, the patient instead had an intense experience of déjà vu. He recalled, in intricate detail, a scene from 30 years earlier. More tests showed his ability to learn was dramatically improved when the current was switched on and his brain stimulated.
Also,
What they don't say in the article is that, as the electrical current was increased, the man forgot the alphabet and asked the scientists, “Can you tell me what kind of cow I am?” At higher currents he simply began yelling “Turn it off! Turn it off!”
Professor Lozano said: "This is the first time that anyone has had electrodes implanted in the brain which have been shown to improve memory. We are driving the activity of the brain by increasing its sensitivity – turning up the volume of the memory circuits. Any event that involves the memory circuits is more likely to be stored and retained."