When I had my large bowel removed 25 years ago, I woke up with tremendous back pain. Despite having my stomach sliced open, the only thing I complained about was my "f@cking back". (I put it that way as for the first 24 hours I don't recall much at all, but my family tells me I was constantly referring to my back in that manner and morphine in the same sentence). My understanding is that there is some arc to my body when the surgery was done, to get easier access to the stomach area. Given the weakened state of my bones (despite only being 18 years old, I had already been on high doses of prednisone for 4 years), the bending of the back for so many hours was just too much.
Pain management wasn't as good 25 years ago, post-operation, than it is now, but that said, once you leave the hospital all the good pain management options are out the window! Back to my story. I eventually got released from the hospital (I'm in Canada) and sent home with a prescription for Tylenol 3's to deal with my back pain. That was the biggest mistake. For anyone who suffers back pain, there comes a point when you will do whatever you can to get some relief from it. I would take 2 pills, wait at most an hour. If I didn't feel better, I would take 2 more and so on and so on. It reached a point that I was taking so many of the Tylenol 3's, I could no longer keep any food in my stomach. My typical meals would last in my stomach 45 minutes before I threw up.
I was and still am 6'1" tall. When all this post-surgical back pain reached its worst, I only weighed 100 lbs. I ended up back in the hospital where I spent about 6 weeks being fed through a nasal gastric tube and then a combination of that and a regular oral diet. I left prematurely, as I had a life I needed to get back to, as I was just starting university and I couldn't stay in the hospital until I reached 140 lbs, as that felt like it would take forever.
Now, 25 years later, I am a morphine addict (that sounds worse than it is, as it's prescribed hydromorphone). I take it 4 times a day to get a bit of comfort. I'm not in pain like I was after surgery, but it's just a constant discomfort that is always there and more noticeable at night. I can only get about 4 hours of restful sleep each night. In 3 days, I am going to explore some non-traditional medicine (if you can call it that). I meet with an acupuncturist to see if he can provide me with any long-term help. I am also looking at getting a TENS machine (the device that sticks electricity into you to help heal you) as well. To be honest, the only reason I am considering these items is that my extended health benefits from my employer cover them in part or whole and I am off on short-term sick leave, so time is plentiful.
Final comment: In my case, laying flat on my back (i.e. going to bed) is not my most comfortable position. I find the position you might sleep in a hospital bed (when you elevate the back of it) to be the least stressful on my back position). Often when I can't sleep or I feel a pinch in my back cutting off feeling to my limbs, I get up and go lay on the couch, with pillows behind my back, to simulate the hospital bed position. If I was single, I would likely get a hospital type of bed / Craft-o-matic style, however my girlfriend wouldn't like to sleep the same way and I do not want to have separate beds or a split bed with me up in the air and her down below. At least not now!
Sorry about the long reply. I find I get carried away here as my health seems to define my life!