If you have ever attended a meditation retreat, you will likely have had the experience of feeling sleepy and, occasionally, feeling your head fall forward (sometimes a little; sometimes a lot) and then suddenly being awoken by your head jerking back. This is the stretch reflex in action!
Have a look at this very cute video; it is an extreme version, but so lovely:
Watch it full frame; seeing how he is sitting beautifully while asleep is so much fun!
And it is definitely possible to dream that you are meditating beautifully, with perfect, still, upright posture. Here is a short Zen story, that points in the same direction:
The great Taoist master Chuang Tzu once dreamt that he was a butterfly, fluttering here and there. In the dream he had no awareness of his individuality as a person. He was only a butterfly. Suddenly, he awoke and found himself laying there, a person once again.
But then he thought to himself,
“Was I before a man who dreamt about being a butterfly, or am I now a butterfly who dreams about being a man?”