Nancy did not wake up from her dream. When she thought she had pulled Freddy out from her dream, she was actually still dreaming. This explains Marge fading into the bed, Freddy rising up, and Nancy stepping outside from her Mother's bedroom unharmed & unaffected from the film's events. Due to Nancy turning her back on Freddy - she robbed him of his power. Knowing that he couldn't get to Nancy now, Freddy detained her in the car and killed her mother (while she slept) instead.
We also learn in the Nightmares On Elm Street comic series by Innovation Comics - that Nancy was institutionalized after her mother's death. Afterward, she went to college and excelled in psychology/dream research. She returned to Springwood in Nightmare 3 to help kids that suffered from the same kind of nightmares that she did - but it wasn't until she was in Kristen's dream that she recognized the true problem. Also during this time, she was taking the dream suppressant: Hypnocyl - to keep from dreaming.