Are there some genetic reasons I get fibromyalgia off and on?

Dom't know. But in general. Almost every illness humans can get has some genetic component.
Possibly. There may be a genetic predisposition as there is clustering of cases in families (aggregation). Stress may activate it. It is more common in women, 9 to 1. If an identical twin has it there is 15% chance the other one will develop it as well. The inheritance likely involves many genes, typically those involving dopamine, serotonin, or norepinephrine.
JHS. Genetic relationship of fibromyalgia (fm) explained by joint hypermobility syndrome (jhs) which has known genetic relationships. British clinicians well acquainted with concurrent occurrence of jhs & fm. Garden variety jhs is common & females with this variation able to oppose & touch thumb to forearm, hyperextended elbows, lock knees & touch palms to floor & were able to back bridge as children.