Based on the results of brain-imaging studies, an analogous problem is occurring in insomnia patients. Recursive loops of emotional programs, together with retrospective and prospective memory loops, keep playing in the mind, preventing the brain from shutting down and switching into sleep mode.