Data are presented which show that a major part of the localized electronic state distribution in hydrogenated amorphous silicon is in thermal equilibrium at elevated temperatures. Measurements of electronic transport are reported, with particular emphasis on the effects of annealing and cooling the samples. Two regimes of behavior are observed. When samples are cooled below a temperature TE, the electronic and atomic structures slowly relax with a temperature-dependent time constant. In n-type samples the relaxation time is several weeks at room temperature, and TE is 1/4130°C. In p-type samples the time constant is a few hours and TE is 1/480°C. The second regime above TE corresponds to a relaxation time short compared to experimental times, and the structure attains a metastable thermal equilibrium. We show that the defect-compensation model of doping provides an accurate phenomenological description of the results. Furthermore, a quantitative fit to the data is obtained using the known density-of-states distribution. The bonding rearrangements that enable changes in the localized-state structure are discussed. We propose that the motion of bonded hydrogen is important, and that it can be considered to form a separate substructure that has properties similar to a glass. In this model the equilibration temperature TE is identified with the glass transition temperature. New measurements of hydrogen diffusion are presented to support the model.