When I woke up, I found myself lying on the floor.

Literal

Eye [subject-が] wake-up-[and-see-てみる][when-と] I [topic-は] floor [on-上] [at-で] was-lying.

床の上で ('on top of the floor') is slightly redundant compared with 床に — 床 already implies a surface — but the overt 上で emphasises the 'on top of' aspect, picturing the lying body on the floor's surface. で here is locative, marking the place where the action of lying takes place.