To alleviate neck pain then you should be very picky about your pillow. Use a pillow that conforms (like a memory foam pillow) so that the pillow is higher under your neck than under your head, preventing the neck from flexing all night.

For back sleepers, it is essential to use a flat or flexible pillow which helps cradle and contour to your neck and head for added relief. A memory foam pillow provides amazing support for your neck and spine making it ideal for back and side sleepers alike.

Make sure to replace worn pillows (some experts recommend new pillows once a year) and listen to your spine. When you lay down, make sure your neck and spine feel aligned and your muscles feel relaxed, like when you are standing up with great posture.