Electron states in a inhomogeneous Ge/Si quantum dot array with groups of closely spaced quantum dots were studied by conventional continuous wave ($cw$) ESR and spin-echo methods. We find that the existence of quantum dot groups allows to increase the spin relaxation time in the system. Created structures allow us to change an effective localization radius of electrons by external magnetic field. With the localization radius close to the size of a quantum dot group, we obtain fourfold increasing spin relaxation time $T_1$, as compared to conventional homogeneous quantum dot arrays. This effect is attributed to averaging of local magnetic fields related to nuclear spins $^{29}$Si and stabilization of $S_z$-polarization during electron back-and-forth motion within a quantum dot group.