this is Dr. David
you could have constipation or irritation of your bowel lining or perionteum causing your pain in your right lower back.
laying down could also be worsening pinched nerves in your back possibly.
you may need a more supportive mattress to sleep on.
you may benefit from a spine MRI scan and a kidney ultrasound scan
do you have a doctor you can see who can do some testing for you?