It could be a irritated nerve root coming from the lower back, tightness in your piriformis muscle pressing down on the nerve or it could be tightness of the IT band. If this sharp pain is along the lateral aspect of your right leg near the knee it might be more likely the tightness in the IT band. If the sharp pain is more global into the right leg then it is probably due to a irritated nerve. To attempt something to give you lower back pain relief and reduction of the symptoms try this. Sitting in an upright position, cross your right leg over your left, placing the ankle bone of your right foot onto the thigh of your left leg, gently lean forward to get a stretch in your right glut. If you pain decreases, it is due to tightness in the Piriformis muscle. If your pain gets worse, especially increased pain in the knee, then it is due to tightness in the IT band.
I hope this helps.