(someone) is tossing and turning
When someone can't sleep well, they turn over in bed a lot to try to find a more comfortable position. This is known as "tossing and turning".
Another way to describe this situatiion is to say that a person's sleep was "restless":
She's always been a restless sleeper. She tosses and turns all night long.
Neither "tossing" nor "turning" by themselves express this meaning of sleeping badly.