I started getting terrible pain in the middle back, not on the spine but in the muscles that traverse mid-back, over the summer while on the way to losing 45 pounds. At first, I thought it had something to do with the weight loss. What really happened is, when I lost butt fat, the front edge of my piano bench, where there's less padding, and where I had always sat before, felt less comfortable, so I moved my butt to the middle of the bench where there's more padding and backed the bench away from the piano accordingly. My hydraulic Hidrau Academy bench is at it's lowest possible height. That height had always felt most comfortable in the past.
Problem is, my bench is tilted slightly forward, so when I shift my sitting position from the front of the bench to the middle, the middle spot is higher for two reasons: the padding is thicker there; and the middle is higher than the front due to the natural tilt of the bench. This forced me to lean forward more to lower my forearms and hands to where they belong. It was this leaning forward position that caused the mid-back pain.
So I folded a bath towel and draped it over the bench. It now feels comfortable sitting on the front of the bench again, and the mid-back pain went away.
I think experimenting with your bench height and where you sit on it is your best bet. Most teachers will tell you front of the bench is best practice. That, and having the bench far enough away from the piano to give yourself plenty of space to move your arms in front of you, but not so far back you're leaning over the keyboard when you play.