The size and density of nanopits, generated at the surface of their top layer, strongly affect the electrical and optical properties of AlGaN-based structures. Therefore, the control of the layer quality evolution as a function of the nanopits size/density is a crucial issue to enhance the device performance. In this paper, the effects of the nanopits diameter observed at the surface of AlGaN on carrier dynamics are systematically investigated. The variation of nanopits diameter is achieved through thermal annealing of a set of AlGaN/GaN heterostructures at different temperatures. The samples are characterized using the scanning electron microscope (SEM), energy-dispersive x-ray, high-resolution x-ray diffraction, photoluminescence (PL), and timeresolved PL spectroscopies. SEM images have revealed an increase in the nanopits diameter with increasing annealing temperature. In addition, we observed a linear development in the yellow luminescence intensity, accompanied by a deterioration in the PL decay times due to an increase in the density of point-defect complexes that act as nonradiative recombination centers. We also performed temperature-dependent PL measurements to study the impact of the nanopits diameter on electron-phonon scattering processes. Both electron-acoustic-and electron-longitudinal optical phonon interactions enhance with increasing nanopits diameter.