Memory foam seems to be a not so cheap, cheap alternative to a proper mattress. I have mostly seen them used as mattress toppers, for the super hard mattresses we get in China. I also see a lot of people selling them off, second hand, in the classified ads.
A quality mattress is going to cost what seems a lot, but probably less than the price of a cup of tea per day in a cafe, for the next year and a good mattress will last 10. Considering we spend 1/3 of our lives on one, it is worth paying for a good one.