The obesity epidemic represents an important public health issue in the United States. Studying obesity trends across age groups over time helps to identify crucial relationships between the disease and medical treatment allowing for the development of effective prevention policies. We aim to define subgroups of age and cohort effects in obesity prevalence over time by considering an optimization approach applied to the age-period-cohort (APC) model. We consider a heterogeneous regression problem where the regression coefficients are age dependent and belong to subgroups with unknown grouping information. Using the APC model, we apply the alternating direction method of multipliers (ADMM) algorithm to develop a two-step algorithm for (1) subgrouping of cohort effects based on similar characteristics and (2) subgrouping age effects over time. The proposed clustering approach is illustrated for the United States population, aged 18–79, during the period 1990–2017.