It could be a number of factors that combine to cause your pain. The thing you mentioned about your birth would need to be seen by a professional, but the mattress could be a suspect for sure.
Did this pain start recently or have you always had it?
How is your posture during the day?
How is your posture when you sleep?
There are certain Yoga positions that helped me to find more comfortable ways of sleeping, or at least made me more conscious of the times when i was sleeping in a bad posture. There is one posture where you lay flat on the floor and place one of those Yoga bricks underneath your spine, and also another where you lay flat on the floor with your head to the side and hands down. These two really helped me to find more comfortable positions during sleep - which in turn has definitely reduced my back pain.
Also I've noticed that increasing my overall energy level seems to help my body to re-align itself naturally. This includes diet, sleep, exercise, taking breaks during work, breathing exercises, etc.
It's a good thing that you are willing to try different options. Unfortunately, the Yoga itself probably won't be a magic solution to the pain. For me it's a constant battle. I have to really be
fully aware of my body posture throughout the day in order to catch myself before sliding into ones that cause me pain later on.
Do you find that maintaining the posture that makes you more comfortable helps to ease your pain or is it unmanageable to keep up throughout the day?