Background: The incidence and prevalence of inflammatory bowel diseases (IBD) are increasing around the world, especially in Western countries. The objective of this study was to evaluate the health habits of healthy controls and individuals with IBDs to identify possible risk factors for IBD development. Methods: A case-control study was conducted among Spanish participants over 18 years of age. A self-administered questionnaire was completed by subjects to collect information on several sociodemographic variables and habits, such as the consumption of tobacco, alcohol, antibiotics, nonsteroidal anti-inflammatory agents and macronutrients; anxiety and depression; and quality of life. Results: The main risk factors identified were age; living in an urban environment; anxiety; and excessive consumption of proteins, carbohydrates and fats. In addition, the consumption of fibre had a preventive effect against IBD development. Conclusions: Age, anxiety and living in urban areas pose a risk of suffering from IBD, as does the excessive consumption of certain macronutrients. However, the consumption of fibre has a protective effect on the development of some IBD types.