Yeah, I totally agree with Paxiled, if you need another opinion. This could be a pinched nerve, a compressed disc in your back, or a wide variety of things. You need to see your doctor to find out why. It's not related to any kind of sexual activity. Don't put it off.
This sounds like possible back problems or hip problems. This has nothing to do with sex or masturbation, from the sound of it.