BackgroundMultiple sclerosis (MS) is the most common non-traumatic condition that leads to disability among young individuals. It is associated with demyelination, inflammation, and neurodegeneration within the central nervous system. Information on risk factors of multiple sclerosis is crucial for the prevention and control of the disease. The aim of this study was to determine risk factors of MS among adults in Saudi Arabia.MethodsA matched multicenter case-control study, including 307 MS patients and 307 healthy controls, was conducted in MS clinics and wards in 3 main cities of Saudi Arabia. Age, gender, and hospital were matched. Information on demographics, family history of MS, past medical and family history, sun exposure at different age periods, tobacco use, diet, consanguinity, and coffee consumption was obtained from self-administered questionnaires. ORs and 95% confidence intervals (CIs) were calculated. A conditional logistic regression model was used to control for potential confounding factors.ResultsThe conditional logistic regression adjusted for age and gender showed that being the first child in the family (Adjusted Odds Ratio (AOR) 1.68, 95% CI: 1.03–2.74), having a family history of MS (AOR 5.83, 95% CI: 2.83–12), eating fast food ≥5 times weekly (AOR 2.05, 95% CI: 1.03–4.08), and having had measles (AOR 3.77, 95% CI: 2.05–6.96), were independently associated with an increased risk of MS.In contrast, eating ≥5 servings of fruit per week (AOR 0.25, 95% CI: 0.16–0.38), drinking coffee daily (AOR 0.46, 95% CI: 0.31–0.68), and having a high level of sun exposure at the primary school level and university level (AOR 0.57, 95% CI: 0.38–0.85 and AOR 0.48, 95% CI: 0.30–0.76, respectively) were independently associated with a decreased risk of MS.ConclusionsOur study suggested that high levels of sun exposure during primary school and university, consumption of fruits and drinking coffee protect against MS. In contrast, eating fast food was associated with an increased risk of the disease. Encouraging outdoor activity and healthy diets in school, especially for females, is highly recommended.Electronic supplementary materialThe online version of this article (10.1186/s12883-018-1090-8) contains supplementary material, which is available to authorized users.