A complete monthly record of the annual variation of Na and temperature in the upper mesosphere has been obtained from 3 years of nighttime lidar observations at two midlatitude sites, Urbana-Champaign, Illinois (40° N), and Fort Collins, Colorado (41° N). The Na density exhibits a strong annual variation at all heights between 81 and 107 km, with the column abundance of the layer peaking in early winter and then decreasing by nearly a factor of 4 to a midsummer minimum. There are also significant semiannual components to the variations in the centroid height and thickness of the layer. The nighttime temperature profile between 81 and 105 km exhibits a high winter mesopause at about 101 km and a summer mesopause at about 85 km. During spring and autumn, the mesopause oscillates apparently randomly between these states. A seasonal model of the Na layer was then constructed incorporating recent laboratory studies of the pertinent neutral and ionic reactions of the metal. The background atmospheric composition was provided from three off-line models, as well as from UARS/Microwave Limb Sounder satellite measurements of H2O. With a small number of permitted adjustable parameters, the model is able to reproduce many observed features of the Na layer remarkably well, including the monthly variation in column abundance and layer shape. The biggest discrepancy is during midsummer, when the modeled layer is displaced 2-3 km above that observed, although a factor contributing to this is that the lidar observing period during summer was relatively short and the effect of the diurnal tide could have been incompletely sampled. Both the observations and the model show that Na density and temperature are highly correlated below 96 km (correlation coefficient equal to 0.8-0.95), mostly as a result of the influence of odd oxygen/hydrogen chemistry on the partitioning of sodium between atomic Na and its principal reservoir species, NaHCO3. Above 96 km, a weak negative correlation (-0.2) is explained by the dominance of ion-molecule chemistry. Finally, it was shown that if the eddy diffusion coefficient in the middle mesosphere is significantly smaller or if the global meteoric influx is much larger than the values used in the present model, then processes for permanently removing gas-phase Na species in the mesosphere, such as polymerisation and deposition onto dust particles, will need to be included.