The difference in height is due to a change in the intervertebral discs, which lie between the vertebrae in the spine. The discs are mainly composed of water and it is the changes in this fluid that dictates the height of the discs. During the day, the discs experience a significant amount of loading from activities like sitting, standing, bending and twisting, and as a result these forces expel the fluid in the disc and the disc height becomes less. During sleep, the spine is not under any loading forces, and through osmotic pressure changes we gain the fluid back in the discs, thereby growing taller!
So if you want to be taller – make sure you hydrate well during the day and measure yourself first thing in the morning for the highest results!