We present a theory of the creativity of dreams as well as psychopathology of religious delusions with respect to production of fundamental forms of religious cognition-specifically supernatural agent (SA) cognitions. We suggest that dream cognitions are particularly efficient at producing highly memorable and impactful experiences with SAs because dreams involve three processes that are prerequisites for the generation of god concepts: (1) mental simulations of alternative realities, (2) theory of mind attributions to the extra-natural dream characters and divine beings, and (3) attribution of ultimate value (exemplified by 'good spirit beings'), and dis-value (exemplified by demonic monsters) to the supernatural dream characters. Because prefrontal cortex is deactivated during rapid eye movements (REM) sleep agentic impulses and internally generated ideas are not reliably attributed to Self or dreamer. Instead an exaggerated degree of agency is attributed to these supernatural dream characters who are then embedded in stories in dreams and in myths of waking life which explain their supernatural abilities. These dream-based SAs are salient characters that are processed in sleep-related memory systems according to rules of Lleweelyn's ancient art of memory model and therefore more easily remembered and reflected upon during waking life. When REM sleep intrudes into waking consciousness, as is the case with some forms of schizophrenia, religious delusions are more likely to emerge.
Keywords: REM sleep; creativity; dreams; religion; supernatural agents.