It only takes a moment for a fear memory to become embedded in one’s brain.

It’s part of the aftermath of either being involved in or witnessing a traumatic event. Overcoming the fear can take time, but scientists at Northwestern University say that it can be done in your sleep. They have been able to lower fear levels in people by using certain odors to trigger and then redirect the frightening memories into innocuous ones while a subject is in a deep sleep.

Memories form while we sleep. Neurologist Jay Gottfried, senior author of the study, which was slated to be published by the journal Nature Neuroscience, commented that, “Sleep sort of stamps memories in more strongly. That’s when a lot of memory formation can take place.”

For their study, the researchers created fear of a particular face in their subjects’ minds using conditioning. The participants linked a face and an odor in their minds with a painful electric shock. After some trials, the participants became afraid of the face, and the smell became a cue associated with it.

Smell also triggers memories. At that point, the researchers used the smell to trigger fear memories during sleep as a way to enable the participants to adjust without feeling afraid while they were awake.

Gottfried and his colleagues have not attempted to use this technique on people who live with phobias, but it makes sense to try to treat stressful memories in this manner. The technique could be used to create a connection between a phobia and a particular odor. The first types of patients who could be helped using this technique are people who have a particular odor associated with their fear, such as people who are afraid of the smell of gunpowder.

Sleep does play a role in consolidating memories, which involves parts of the brain replaying the events of the day and determining which parts it will store for safekeeping and which ones it will forgo. Rutgers University psychologist Mauricio Delgado brought up the interesting question of whether there is a window during the process when memories can be updated.