In Hinduism, East direction is considered the most auspicious direction, the direction of the divine. It is believed that divine vibrations radiate from this direction, which spread spirituality.
The atmosphere consists of three kinds of energies, known as the Satva, the Rajas and the Tamas. The Satva energy radiates Godliness in the environment. It relates to the qualities such as - kindness, love, harmony, forgiveness, compassion, etc. The other two energies focus on the qualities that the materialistic world is abundant in. Rajas radiates the qualities of materialistic man, and relates to ambition, restlessness, desires etc. And Tamas radiates evilness. This relates to qualities such as sleep, laziness, addiction, greed, lust, etc. The best among all the three qualities is the Satva. It leads a man to self awareness which further becomes the way to knowledge and salvation, the ultimate aim of human being on the Earth.
All these qualities are present in the human beings but in different proportions. Also, the proportion keeps changing with the daily routine of the person at the different timings of the day. The morning hours are associated with the Satva qualities. The night is associated with the Tamas.
Since the East direction is associated with the divinity and considered the most holy direction, it is also associated with the Satva form of energy. Means, that the Satva energy is radiated from this direction.
Now, you must be wondering what is the association of this direction with sleeping. Well, here is the answer.
Human body has three sub-parts. These are the physical body, the mental body, and the subtle body. The subtle body is also known as the spirit. This subtle body which is responsible for the consciousness of the being, is attached with the physical body through a silver cord. This silver cord stays attached with both of these under all the states.
The head part of the subtle body is the most important part. It is from where awareness, knowledge and positiveness enter the human body. This leads to the spiritual awakening and enlightenment and awareness of the human being.
Ayurveda tells that there are seven chakras in the human body. These chakras keep rotating and are responsible for the regulation of the energy in the human body. When there is an access to positive energy, the chakras rotate in the right direction, leading to the generation of more Satvik energy.
Just as the morning time is associated with Satvik energy, the night time is associated with the Tamasik energy. Therefore, the individual possesses more of the Tamasik vibrations during this time. He radiates negative or Tamasik qualities at night. Such vibrations must be directed towards the West. So that, they can leave the body, and let the positive energy enter the body. West direction is associated with the Tamasik qualities.
One fact is very important to understand here, that energies enter a body through the head of the subtle body and leave the body through the feet.
When an individual sleeps heading East, and keeping legs towards the West, the negative energies associated with the West are directed towards West itself, going out through legs. The positive energy coming from the East, comes and enters the body.
However, if it is the other way, meaning that the head is towards the West and the legs towards the East, the negative energy that is already predominant in the body, moves towards the West through the legs. This Tamasik energy, clashes with the Satvik energy coming from the East, though in a minute amount, because it is the night. And since the head is facing the West, what enters the body through the head is nothing but the Tamasik and negative vibes coming from the West. This leads to the abundance of negative vibes in the body.
For every form of energy, the rule is that the majority wins. Which means that the energy whichever is more in the body will be dominating. Therefore, when there is an abundance of negative and Tamasik, energy, it becomes predominant.
This abundance of the negative energy turns into excess when the person sleeps in this direction everyday. Hence, the scriptures recommend sleeping in the East-West direction.