Reduced physical activity (PA), smoking, and coffee and alcohol drinking constitute risk factors of osteoporosis in patients with inflammatory bowel disease (IBD). The aim of the study was to measure the bone mineral density (BMD) and frequency of osteopenia and osteoporosis in patients with IBD and their correlation with PA, smoking, coffee, and alcohol. The study group consisted of 208 patients with IBD-103 with Crohn’s disease (CD), 105 suffering from ulcerative colitis (UC). Densitometric measurements were performed using the DXA. All patients completed a questionnaire concerning PA, smoking, and coffee and alcohol consumption. The prevalence of osteopenia and osteoporosis (L2–L4) in the IBD group was 48.1%; in the CD group, it amounted to 48.6%, and in the UC group, the prevalence was equal to 33.3%. Patients with CD who were diagnosed with osteopenia and osteoporosis demonstrated reduced PA compared to patients with a normal BMD who exercised regularly (p = 0.0335). A similar observation was made in the group of women with IBD. Women with a normal BMD exercised significantly more often than women suffering from osteopenia and osteoporosis (p = 0.0146). However, no differences in BMD were observed with regard to coffee use, alcohol consumption, or smoking. Thus, since the incidence of osteoporosis in IBD patients is high, it may be dependent on PA.