We develop a theoretical model to analyze a nonequilibrium optical- (LO-) phonon population by Raman scattering in GaAs/AlxGa1-xAs quantum webs. With the assumption of bulklike hot-electron relaxation, the effect of LO-phonon confinement on a nonequilibrium optical-phonon population (NOP) is isolated. Our analysis shows that the decrease in spatial extent or coherence length of LO phonons is reflected by a decrease in NOP. This is because the contributions from large q wave vectors with small occupation numbers dominate as the spatial extent decreases. Our method is applied to explain picosecond Raman-scattering experiments on GaAs/AlxGa1-xAs. The increasing NOP with decreasing x is interpreted as the result of an increase in the coherence length of LO phonons, since for smaller x, the AlxGa1-xAs barrier is no longer effective in localizing GaAs LO phonons within the well. Using this model, we also deduce coherence length of LO phonons as a function of x. Our results show that for values of x between 0.2 and 0.4, the GaAs LO phonon in GaAs/AlxGa1-xAs quantum wells changes from a bulklike propagating mode to one localized within the wells.