Although the exact details are unknown, researchers believe that sleep is helpful in integrating and strengthening new memories. When I was a fellow, it was thought that this occurred mainly in dream (REM) sleep. Here is an article that studied the effect of slow wave sleep (SWS), a deep non-dream state, on memories related to fear. Apparently, studies have shown that memories can be reactivated during SWS by a reminder cue like odors or sounds experienced during SWS.
In this study, researchers used a conditioning procedure in humans to elicit a fear response. Specifically, they repeatedly paired a neutral sound with a mild electrical shock to the wrist of the participants. After enough pairings, the neutral sound would cause a measurable fear response in the participant, even without the electrical shock. In other words, the participant learned that the neutral tone meant the electrical shock was coming. After this conditioned learning, the participants slept for 4 hours because the first 4 hours of sleep are dominated by SWS. The second half of sleep is dominated by REM sleep, and the researchers wanted to isolate the effects of SWS.
One way to eliminate the learned fear response that has become paired with a conditioned stimulus like a neutral tone is to repeatedly expose the subject to the neutral tone but without the electrical shock. Over time, the neutral tone will stop causing the fear response as the subject learns that the electrical shock no longer is associated with the neutral tone. So in the study, the researchers played the neutral tone without the electrical shock during SWS. Results showed that this was able to attenuate the fear response. And this was compared to other subjects that received a different tone than the neutral tone and in those that received no tones at all. Finally, exposure to the tones in SWS did not appear to negatively affect sleep architecture or sleep quality.
So what does all this mean? Well in psychology, when someone has pathological fear or post-traumatic stress disorder, one effective treatment is to repeatedly expose the patient to what they fear, so that their fear response gradually attenuates. It's very challenging therapy for patients, because they have to consciously subject themselves to their fears. But, as this study suggests, maybe patients with pathological fear can be exposed to the feared stimulus during SWS, and not have to experience it consciously in order to reduce the fear response. Here's an analogy...it would be like going from having your appendix taken out while awake to having it taken out under anesthesia.