Are there some genetic reasons I get muscle pain off and on?

Possible. There are multiple reasons for muscle pain, including dehydration, over activitiy and numerous others... Best to discuss the pain with your doctor.