In this paper, we investigate the structural properties of AlGaN/GaN heterostructures grown by metal organic chemical vapor deposition on sapphire substrates with different thicknesses using high-resolution x-ray diffraction and Raman scattering methods. We discuss the microscopic nature of spatial-inhomogeneous deformations and dislocation density in the structures. Microdeformations within mosaic blocks and the sizes of regions of coherent diffraction are determined. We reveal a gradient depth distribution of deformations in the mosaic structure of nitride layers, as well as at the interface regions of the sapphire substrate on the microscale level using confocal micro-Raman spectroscopy. We determine that an increase in substrate thickness leads to a reduction in dislocation density in the layers and an increase in the elastic deformations. The features of the block structure of nitrides layers are shown to have a significant influence on their elastic properties.