It is not recommended that you meditate while lying down. One has to sit at least in an upright position.
Quoting from the book "Meditation and its Practice" by Swami Rama.
Suggestions for Making Sitting Positions More Comfortable:
It is not recommended that you meditate while lying down. There are several reasons for this. One of the most important is that most
people rapidly fall asleep in a reclining position, or have difficulty
maintaining any alertness or awareness. Obviously, if you are dozing
or asleep, you won't be able to meditate.
Actually, there is also a more subtle reason. At deeper levels of
meditation it is important to be able to sit with the spine correctly
alligned, since this allows a certain type of subtle energy to move
upward through the body. This interesting topic is dealt with in great
detail in several advanced level books on meditation, such as Path of
Fire and Light.
Chapter 3 -- Meditative Postures, page 35
So, Shavasana, which is basically lying down and not a sitting posture, is not recommended for meditation.
The author suggests that the aspirant must decide on any particular posture of his/her choice and then try to master it. Once one is able to sit in a particular posture for a relatively long period of time without feeling any discomfort and without having a feel of the body, then that is called Asana Siddhi. With that Siddhi being achieved success in meditation becomes easier to attain.
Updating the answer with couple of VedAnta Sutras (Brahma Sutras).
Vedanta Sutra 4th adhyaya, 1st pada states:
Asinah sambhavAt || (7)
UpAsana is possible only while being in a seated posture, therefore do
it while seating.
DhyAnAccha || (8)
For DhyAna (meditation) too [the rule is the same].