Mattress advice

Hello! Im struggling to get to sleep and stay asleep due to pain in my hips and knees. Any suggestions on what to look for in a good mattress? Or things to avoid? Thank you