It depends on what is causing your back pain. I would recommend going to a chiropractor or an orthopedic doctor to find out the cause of the pain (if you're not already under a doctor's care) and what treatment you need. Having a comfortable bed for your body to rest will be very helpful in your overall recovery.
A thick piece of firm foam (6 inches or thicker), the size of a single bed mattress is a good bed for most people because the foam molds to your body's contours. Regular mattresses often have springs, etc. that can eventually be uncomfortable.