There are many different superstitions in the world, some of which can cause laughter, while others - anxiety. The latter, perhaps, includes the widespread opinion that it is dangerous to sleep with your feet against the door.
There is such a sign that you cannot sleep with your feet to the door. The basis of this superstition is the rite of carrying out the deceased person during the funeral from home. You've probably noticed that the dead are carried out of the house with their feet first. This tradition is by no means an accident, it comes from Ancient Scandinavia.
Exit to another world
In the antiquity of the northern lands, people believed that the world consists of three parts: Midgard is the world of people, surrounded by Utgarde (another world) from all sides, a world of dangers and monsters. There was also another world, the world of the gods - Asgard. According to this belief, the ancient people thought that their home was Midgard, which is protected by walls and doors from the surrounding Utgard. For this reason, the door was considered an exit into the world of the already dead, their souls.
The Scandinavians considered sleep to be a short death, when a person's soul is separated from the body and goes into some kind of space.
People believed that if you sleep with your feet to the door, then the soul leaves the body and goes to the exit, to the other world, from where it will be difficult for it to return. Carrying out the deceased with their feet forward is from the same belief, since the soul of a deceased person has nothing to do among the living.
Versions of the present
There is also a more modern answer to the question of why you can't sleep with your feet to the door. Many people note that when you sleep with your feet to the door, restless sleep comes, nightmares dream - this is all from the fact that a person subconsciously feels defenseless.
The Feng Shui teaching connects this tradition with the movement of energies and encourages to sleep strictly to the cardinal points, but so that in no position to be feet to the door or to the window, because in this position there is an outflow of vital energy. After sleep there will be no feeling of rest, and there will be no relaxation during the night.
It is also forbidden to lie down in front of the mirror, it steals energy.
Slavic beliefs
The ancient Slavs were pagans and believed in the forces of nature, they believed that the God of darkness and darkness of the night remains outside the door while the inhabitants of the house turn on the light inside the room. An open door, in principle, concealed danger and was an obstacle for the dark forces, sleeping with your feet to the door meant putting yourself in danger, because the God of darkness could enter into a conspiracy with domestic evil spirits (many still believe in brownies and courtyards), which will help him pull out the sleeping man's legs out the door.
They also believed that during the fog, when the eyes of the blacksmith god Svarog are covered, evil forces penetrate the door crack, they also strive to take possession of the human spirit by stealing his body.