Hypnagogia briefly occurs between wakefulness and sleep. A hypnagogic state can be achieved by purposefully waking yourself during this period and can result in a heightened state of creativity.
Notable practitioners include Salvador Dali, Benjamin Franklin, and Albert Einstein.
Composer Giuseppe Tartini wrote a violin sonata known as the Devil’s Trill after an experience where he listened to the devil play in a dreamlike state. It’s one of the most technically difficult pieces to play for violin.