Have you thought about an epsom salt bath?
I get leg pains when my magnesium level is low. I would never prescribe, but an epsom salt bath is a safe way to let your body absorb magnesium. It can not only relax the muscles, hopefully decreasing your pain, but it can also help with sleep. Best, it is not expensive, at least not here in the USA.
Just draw a very warm bath, throw in a cup or so of salts, soak for at least 30 minutes. Some people follow up with a quick rinse to get residual salts off their body because they say they might itch. I have never had that problem. I may follow with lotion, but usually not because after soaking I feel like a wet noodle and just want to go to bed.
Just a thought.