I wonder what society first held the mythological idea that skeletons could reanimate and how long ago the idea originated. Were they viewed as demonic? Vengeful? A positive visit from ancestors? What did they believe made it physically possible?
Answer part 1: This excerpt from my draft Introduction to Folklore addresses your question in generic terms; perhaps it will be of help:
Death was an opportunity to ensure the eternal wellbeing of a friend or relative. It could also provide the living with a powerful supernatural ally. Burial practices in Western Europe generally reflect positive attitudes towards the dead. The farther to the east in Europe one looks, one finds cultures increasingly concerned with the possibility of the dead walking after death. People regarded the deceased in general as malevolent and dangerous. These generalizations can be easily challenged to contrary examples from various regions; the diversity of humanity is key even though there are general regional trends.
There is archaeological evidence of feelings towards the dead. In Western Europe, Neolithic societies buried the deceased in collective mounds where the bones accumulated. People made seasonal gifts at the entrances to these chambers apparently to procure continued good will from the otherworld and to ensure that departed loved ones would have a comfortable existence. In the east, prehistoric burials were typically solitary. It is not uncommon to find remains that were tightly bound in a fetal position. Individuals who apparently inspired particular concern had rocks shoved into their mouths and large stones placed above their burials. These were apparently intended to keep the dead from talking and walking from the grave. This sort of archaeological evidence can also be found in burials from historic periods. Again, any effort to see these contrasting traditions as rigidly defined by geography is called to question by exceptions.
The Eastern European tradition of the walking dead has diffused into North American thanks to the literary and cinematic use of the Nosferatu, the vampire. This said, the idea of walking corpses cannot be regarded as entirely an eastern phenomenon: the animated dead also played an important role in medieval Icelandic sagas. Here, the aptrganga maður – the “after walking man” – was especially troublesome and required the bravery and strength of a great hero to end its reign of terror. Chopping off the head of the corpse and pacing it between the body’s legs was one of the only ways to put these monsters to rest.
Throughout European peasant society, there was also a great deal of concern about determining when a person had “passed over.” In modern society, it may seem obvious that death occurs when the heart stops. Even today, however, the line between life and death can be vague, occasionally requiring a judicially-determined definition. And even this can become the subject of political squabbling. In the modern world, death can be defined as brain-dead, but then there can be a question of whether it is appropriate, ethical, or legal to “pull the plug” to stop the heart from beating when the brain ceases to function. In traditional European society, the line between life and death was far more ambiguous. A person still living by today’s standards could cross over into the domain of death because of a disease, immense old age, or because of a curse. A large catch of fish or some other extraordinary circumstance might also signal the transition even when dealing with a healthy, young person.
In the Icelandic sagas, these people were known as feigr, or “fated to die.” This is echoed in the archaic English word “fey” as in “he had a fey look about him.” In other words, the person was destined to die, and somehow the shadow of death had already descended over him even though his heart continued to beat. A person who had made this transition withdrew from normal society and activities, preparing to die. Society regarded the person as essentially dead.
In the same way, the dead could do almost as much as the living. Medieval stories tell of the dead walking, talking, eating, and having sex. Obviously, such occurrences were to be feared and there were many rituals and forms of magic intended to keep the dead in a peaceful quiet of eternal sleep. In contrast, there was also a wide variety of magical practices available for the brave few who would call upon the dead to do their bidding.
Answer part 2: An additional excerpt from my Introduction to Folklore; the point in these excerpts is that various cultural groups tend to see visits from the dead as either corporeal (along the line of your question) or as more ethereal. These traditions have deep roots, and the nature of the visitor can determine a great deal about his/her nature:
People tells stories about the dead appearing before the living perhaps in all cultures, but there are several forms they can assume. Some cultures emphasize animated corpses and that the dead can bodily rise from the grave and walk the earth. Others have traditions involving the dead appearing only as disembodied spirits. Most people think of the dead in human form. This is a requirement for animated corpses, but it is also a general assumption about spirits. There are, nevertheless, legends of souls and ghosts appearing as animals.
The attitude of the dead can be hostile or favorable to the living. The farther east one goes in Europe, the more likely that the dead will be hostile to the living. In general, walking corpses do little good, but the spirits of the dead, while sometimes benevolent, can also be dangerous. Legends about the dead should be considered along these lines. In modern North America, ghosts are generally spirits in human form, and in folk tradition they usually are good-willed toward the living. Films and literature contradict this by often depicting the dead as perilous.
The Lenore Legend is one of the older and more widespread stories about the dead. It was so well known that Aarne and Thompson include it in their folktale index (Type 365), even though it is more often told as a legend, that is, to be believed. In the story, a young bride waits for the return of her betrothed who has gone off to war. Other soldiers come home, but not the man she loves. One night, he appears before her and asks her to leave with him. Delighted to see him, she climbs up behind him on his horse, and they ride quickly across the moonlit landscape. At one point, his horse jumps over a fence, and he pitched forward, revealing that the skin has been sheared off the back of his head, and his white skull shines bright in the moonlight. In other variants, his bride looks down at a stream they are crossing, and in the moonlight, she sees their reflection, revealing her companion to be a rotting corpse. Just as they reach his open grave, she jumps from the horse, saving herself. Her bridegroom returns to his grave, which supernaturally closes. The woman lives to tell her tale, but in many variants she dies soon after from the shock.
Gottfried August Bürger (1747-1794) made this story famous with his 1773 poem, “Lenore.” Within a decade after its publication, the German-language masterwork appeared in English translation, becoming an immediate sensation: it is credited with influencing Coleridge, Wordsworth, and other British poets of the newly-emerging Romantic era. In addition, the fame of Bürger’s poem and the association of the name “Lenore” with all things morbid may have influenced Edgar Allen Poe to write his own poem with this name and to figure the name in some of his other works.
The story appears to be extremely old as evidenced by the Old Norse story from The Poetic Edda, the “Second Lay of Helgi the Hunding-Slayer/Helgakviđa Hundingsbana II.” This describes how Helgi, a dead hero, returns from the grave on a horse to beckon his beloved, Sigrún, for one last night of conjugal bliss. The document suggests that originally the story may have played out differently: Sigrún willingly enters Helgi’s burial mound to lie with him. The poem subsequently relates that the heroine “lived but a short while longer, for grief and sorrow.” With this, the medieval text returns to the conclusion found in its more recent counterpart. This example suggests that for pre-Christian society, crossing the line into the supernatural – or at least in this case into the realm of the dead – for romance was heroic. Nineteenth-century expressions of the story generally assert that no living person would want to enter the grave, even when it is the last resting place of a lover. In a Christian context, the living must have no greater love than the one reserved for God, and to choose death runs against Christian teaching.