If you haven't been working, lifting items, exercising, were bed-ridden for medical reasons or as a personal decision, or have stretched recently; You probably just pulled a muscle. We cannot say for sure, due to a lack of information, but if the problem persists please see your doctor. Your doctor can suggest exercises, give a prescription for pain medicine, or even take x-rays to check the pained area.
Back pain lower right side causes are: Lower back and kidney disorders.
If it is in the lower right, comes on suddenly and does not go away, it may be an appendicitis. If it comes in waves, with nausea and includes lower back pain it may be kidney stones. If it is sudden, causes nausea, and is lessening in intensity over 1-3 hours it may be a rupturing ovarian cyst.
One can find information about the causes of lower back pain from the following sites; Chronic pain site, WebMD, Mayo clinic, Bupa, Health guide, and NHS.
sciatica
You could have a slipt disc in your lower back, they are very painful.
Possible causes of lower back pain that can result in the inability to lift the leg include herniated discs, sciatica, spinal stenosis, and muscle strains.
Possible causes of lower back pain when lifting your leg while sitting include muscle strain, herniated disc, sciatica, or spinal stenosis.
LABOR
Common causes of lower back pain when walking uphill include muscle strain or fatigue, poor posture, improper footwear, and underlying conditions such as herniated discs or spinal stenosis.
To prevent lower back pain when lifting your leg, focus on strengthening your core muscles, maintaining good posture, and using proper lifting techniques. Stretching regularly and avoiding sudden movements can also help prevent strain on your lower back.
A sudden increase in sexual behavior can cause lower abdominal pain in women. This is if they do things too fast.
Could be Kidney infection? Just a suggestion