In general, a medium-soft to medium mattress is better for hip pain, while a firmer mattress is better for back pain. A softer mattress can help to relieve pressure on the hips and allow them to rest more comfortably.