We propose an optimization method for applying the seismic-wave gradiometry (SWG) method to a dense seismic station network consisting of nonuniformly distributed seismographs. As a nonuniformly distributed station array, we consider the station layout of the Metropolitan Seismic Observation Network (MeSO-net) operated in and around the Tokyo metropolitan area, Japan. In this study, thereby, we numerically investigate optimum shapes of weighting functions, which control the spatial weights of individual stations when estimating waveforms at any grid points in the SWG method, to reconstruct seismic wavefields propagating in the MeSO-net. The functions with isotropic spatial weights are found to be appropriate for wavefield reconstructions with seismic waves incoming from practically all directions, even for nonuniformly distributed stations. The reproducibility of the wavefields is greatly improved by changing the shapes of the spatial weights reflecting density of the stations. Further plausible wavefield reconstructions are made by considering the propagation directions of the seismic waves. In these cases, if theweight of a contribution for a wavefield reconstruction is larger at far stations with a direction perpendicular to the wave propagation direction, then the reproducibility of the waveforms is significantly increased. In addition, the spatial gradients of the amplitudes are well reproduced by the optimized SWG method even though the optimization only focused on the amplitudes. Therefore, our proposed optimization scheme can be used to accurately estimate seismic wavefields in a nonuniformly distributed station array. Actually, the weighting functions optimized in this study succeeded to reconstruct the seismic wavefield of a shallow crustal earthquake that occurred around the Tokyo metropolitan area, based on the observed seismograms obtained by the MeSO-net.