Understanding the ratcheting effect of hydrogen and hydride accumulation in response to thermal cycling is important in establishing a failure criterion for zirconium alloy nuclear fuel cladding. We propose a simple discrete dislocation plasticity model to study the evolution of the dislocation content that arises as a micro-hydride repeatedly precipitates and dissolves over a series of thermal cycles. With each progressive thermal cycle, we find a steady growth in the residual dislocation density in the vicinity of the hydride nucleation site; this corresponds to a gradual increase in the hydrogen concentration and, consequently, the hydride population. The simulated ratcheting in the dislocation density is consistent with experimental observations concerning the hysteresis in the terminal solid solubility of hydrogen in zirconium, which can be correlated to the plastic relaxation of hydrides.