The Babydorm pillow can prevent the flattening. The special thing about the pillow is that the baby's head floats evenly in the hollow above the mattress - without one-sided pressure.
The Babydorm pillow was first launched in 2006 and was the first of its kind at the time.