The shape of pillows have not varied much over time. They were first used as to lean against the headboard of a bed. At the time most people just sat upright to sleep so that gave them a support to sit in a more relaxed position. Slowly over time they slipped down onto the bed itself and as a result people lie down and sleep more.
How Are Pillows Made