Genetics and environmental factors can increase the risk of multiple sclerosis (MS). Women ages 20 to 40 and people with a family history have a higher risk. Viral infections, some autoimmune diseases, living in temperate climates and having low levels of vitamin D are associated with MS.