Rokurokubi is a type of Japanese yōkai (apparition). They look almost completely like humans with some differences. There is a type whose neck stretches and another whose head detaches and flies around freely (nukekubi). The Rokurokubi appear in classical kaidan (spirit tales) and in yōkai works.
The nukekubi are rokurokubi whose heads come off and float about. These were the last of the rokurokubi whereas the other kind came before. Nukekubi sometimes perform bad deeds such as attacking at night and drinking their victims' blood. It is theorized that the nukekubi has a weakness when it is sleeping and the head is floating around: if the body moves, then the head cannot be re-united to the body. Classical literature about rokurokubi describe tales of people witnessing and encountering floating heads at night time. Sometimes, the action of the head separating from the body is seen as the soul wandering away from the body, i.e. somnambulism.