It's not clear whether the brain actually is designed to have nightmares or whether this is actually the process going awry.
Walker, Matthew. Interview by Terry Gross. "Sleep Scientist Warns Against Walking Through Life 'In An Underslept State'." Fresh Air, NPR, 20 July 2017.
Sourced by: Quote.org sourced