Well, okay, a lot of them slept on the floor; it would vary depending on class as to what you slept on and exactly how you slept, weird sleeping positions aside.

But anyway…
I first heard about people sleeping upright in bed when on a guided tour of Doune castle years ago.
Of course I didn’t know any better then.
Every not and then I come across the idea that medieval people slept sitting up, either because they were afraid of lying down like you din coffins or because of some sort of medical reason. This is allegeldy supported by the short beds that have survived from the period, although given how few beds have survived, and the known greater shortness (I think I might want to rephrase that) I don’t see that this point has any validity.
And one way to check these claims is through pictures.

Using Larsdatter.com, I examined quite a few. Oddly enough the ones titled “Dream of X” mostly show the sleeper lying flat on their back:
Dream of St Ursula
Some other St having a dream
Sure, the pillow is rather large and there is a tendency for their head to be raised, but that certainly isn’t sleeping upright.

If you look at this picture the bed clearly lacks the large bolsters etc needed for someone to sleep upright:
Bed in the background of the Annunciation

The odd one out is this one:
Having a bad dream
although in this case the occupant appears to be awake and watching 2 dragons fighting, maybe that is why he is propped up?

Otherwise, ill people or those who are talking to others whilst in bed are propped up:
An ill person

look at the fancy striped bedspread
So to summarise – it appears that they did sleep flat on their backs, with various arrangements of pillows and bolsters permitting a range of angles. Some probably did sleep propped up, but it certainly doesn’t seem to be a majority. Thus I claim this old idea is sunk beyond recall.