Memory foams respond to body heat and pressure by softening to contour to your body and spring back into shape as the foams cool down. However, just like any cushioning that bears your body weight, it's normal to expect some body impressions after you lie on your memory foam pillow night after night, but it shouldn't flatten out with normal use.
It's a good idea to replace your memory foam pillows every three years or so to make sure your pillow is always supportive and hygienic.