Hi. Welcome To Healthcaremagic
I am not sure whether they are related. I think they are not related.The intermittent pain in legs near toe is called Gout. Treatment of acute attacks of pain include Colchicine
, pain medicines. To prevent recurrent episodes you need to be on Allopurinol
But to rule out any venous clotting problems , I suggest you get Doppler ultrasonography
of lower extremity.
Regards, Dr. Jagdish