Will potassium and sodium deficiency cause muscle pain and strain?

Potassium yes. It is very common to experience muscular problems with low potassium but not all causes of cramps, muscle pain or strain are due to low potassium. Low sodium is less likely to be associated to muscle pain and strain.