“...I was lying on something hard, so that I am black and blue all over my body”. This sentence means that ...
The princess's skin turned black and blue as she slept on the broken mattress.
The princess's skin turned black and blue because she fell on the road when she headed to the palace.
The princess became ill because she couldn't sleep on the mattress overnight.
The princess's back was bruised as she slept on the uncomfortable mattress.