I also have a magnesium deficiency which I have had for the past 5 yrs.
When not on IV treatment for antibiotics , the magnesium sulfate is injected 5cc IM every 2 weeks. I also take Magnesium glucanate orally daily. My body doesn't retain magnesium. Without the injections I have arythimia issues and extreme pain. I have seen various endrocronogists and no one has been able to crack the case as to why my body depleats magnesium.
I have monthly RBC magnesium blood tests to keep my count up.
I found that when I was on the antibiotics for my lyme my pain disappeared after 4 days on treatment. The pain in the muscles is a pulling feeling of the outer facscia which is very painful. Having massage actually helps relax the muscles in the legs. Interesting when on antibiotics I am totally pain free.
For starters, I would not assume the pain is from Lyme disease, or from infection. Deep muscle pain in the upper quads of the legs is a hallmark of a circulatory disorder - intermittant claudication - or possibly a thrombosis. If this is the case deep massage is contraindicated, unless you want a clot to break free and travel. So square one is to get a consult regarding your vascular status and a color dopplar. Going "on-and-off" antibiotics is not the greatest idea. It guarantees developing a multi-drug resistant infection. Hopefully you have had your physicians culture whatever bacteria that seem to have infected you. There many "missing pieces" to the story, including the reason for the "pic".