Multimorbidity, the co-occurrence of two or more chronic diseases such as diabetes, obesity or cardiovascular diseases in one patient, is a frequent phenomenon. To make care more efficient, it is of relevance to understand how different diseases condition each other over the life time of a patient. However, most of our current knowledge on such patient careers is either confined to narrow time spans or specific (sets of) diseases. Here, we present a population-wide analysis of long-term patient trajectories by clustering them according to their disease history observed over 17 years. When patients acquire new diseases, their cluster assignment might change. A health trajectory can then be described by a temporal sequence of disease clusters. From the transitions between clusters we construct an age-dependent multilayer network of disease clusters. Random walks on this multilayer network provide a more precise model for the time evolution of multimorbid health states when compared to models that cluster patients based on single diseases. Our results can be used to identify decisive events that potentially determine the future disease trajectory of a patient. We find that for elderly patients the cluster network consists of regions of low, medium and high in-hospital mortality. Diagnoses of diabetes and hypertension are found to strongly increase the likelihood for patients to subsequently move into the high-mortality region later in life.