In Japanese folklore kanashibari is the term used for sleep paralysis, which can feel like the real and dream worlds are mixing. In ancient times, this phenomenon was attributed to supernatural forces, and in some cases spirit possession by yokai. 

'Sleeping Beauty' - Kajita Hanko, 1906
Kitsune or tanuki were often believed to be behind the possession and Buddhist priests were called in to drive out the animal's spirit. Kanashibari can also be caused by ghosts or sorcery. Some stories involve the sleeper feeling like they're being dragged away by their feet.

Unknown artist.

There are also other yokai believed to be responsible for kanashibari. One is makuragaeshi, a ghostly, pillow-flipping child spirit known to haunt rooms where people sleep, sometimes even sitting on their chests.

Sophie Lupas

'Takagi Umanosuke' from the series 'Sagas of Beauty and Bravery' - Tsukioka Yoshitoshi, 1866

'The Ghost of Seigen Haunting Sakurahime' - Tsukioka Yoshitoshi