And Hollywood has just produced its own spin on lucid dreaming and the idea of controlling dreams, with the release earlier this month of “Inception,” a thriller whose plot swirls through the darkest layers of the dream world. As Dr. Barrett wrote in an online review of “Inception,” for the International Association for the Study of Dreams, “I love the idea of millions of action-film fans the world over leaving theaters asking each other if they’re ever had a dream in which they knew they were dreaming — or whipping out their smartphones and Googling to find out if you really can learn to influence dream content.”

Using dream incubation for problem solving, Dr. Barrett, the author of “The Committee of Sleep,” which expanded on her initial research, asks patients to write down a problem as a brief phrase or sentence and place the note next to the bed. Then she tells them to review the problem for a few minutes before going to bed, and once in bed, visualize the problem as a concrete image, if possible.

As they are drifting off to sleep, the patients should tell themselves they want to dream about the problem and ideally keep a pen and paper, and perhaps a flashlight or a pen with a lit tip, on the night table. No matter what time they wake up, they should lie quietly before getting out of bed, note whether there is “any trace of a recalled dream and invite more of the dream to return if possible.” They should write down everything they remember.

For reducing nightmares, she helps patients devise a mastery scenario to work with, and they can remind themselves of it as they fall asleep, saying to themselves, “Tonight if I have the dream of the fire, of Vietnam, I want to find a fire hose, freeze the action, speak to the Vietnamese boy,” She said.

Dr. Barry Krakow of the Maimonides Sleep Arts and Sciences center in Albuquerque and the author of “Sound Sleep, Sound Mind,” helped develop imagery rehearsal therapy. In a 110-page manual he gives his patients, he has them select a nightmare they want to transform into a dream of lesser intensity.