We analyse 3-min oscillations of microwave and EUV emission generated at different heights of a sunspot atmosphere, studying the amplitude and frequency modulation of the oscillations, and its relationship with the variation of the spatial structure of the oscillations. High-resolution data obtained with the Nobeyama Radioheliograph, TRACE and SDO/AIA are analysed with the use of the Pixelised Wavelet Filtering and wavelet skeleton techniques. 3-min oscillations in sunspots appear in the form of repetitive trains of the duration 8-20 min (13 min in average). The typical interval between the trains is 30-50 min. The oscillation trains are transient in frequency and power. We detected a repetitive frequency drifts of 3-min oscillations during the development of individual trains. Wavelet analysis shows three types of the frequency drift: positive, negative and fluctuations without drift. The start and end of the drifts coincide with the start time and end of the train. The comparative study of 3-min oscillations in the sequences of microwave and EUV images show the appearance of new sources of the oscillations in sunspots during the development of the trains. These structures can be interpreted as waveguides that channel upward propagating waves, responsible for 3-min oscillations. A possible explanation of the observed properties is the operation of two simultaneous factors: dispersive evolution of the upwardly-propagating wave pulses and the non-uniformity of the distribution of the oscillation power over the sunspot umbra with different wave sources corresponding to different magnetic flux tubes with different physical conditions and line-of-sight angles.