Hey!!!! I do that all the time!!!
I usually hurt on my left or right lower back around the kidney region. I've hurt this spot countless times during sex and while masturbating.
Try laying flat on your back in bed, no pillows or anything, and grab a belt or a towel. Loop it around one foot and pull using your arms till your foot is at a 90degree angle to the floor. Rest in this position for a few moments, then switch. This relaxes some of the muscles in your back.
The other gentle stretch I use for my back is lying on the floor with my legs flat up against the wall. I stay like this till my back relaxes.
It's not fun hurting your body badly while doing something that is enjoyable!!!! But it does make for some funny stories!!! Hope the above helps and if you'd like more easy stretches, drop me a message.