Gaussian processes (GPs) can capture correlation of the acoustic field at different depths in the ocean. This feature is exploited in this work for pre-processing acoustic data before these are employed for source localization and environmental inversion using matched field inversion (MFI) in an underwater waveguide. Via the application of GPs, the data are denoised and interpolated, generating densely populated acoustic fields at virtual arrays, which are then used as data in MFI. Replicas are also computed at the virtual receivers at which field predictions are made. The correlations among field measurements at distinct spatial points are manifested through the selection of kernel functions. These rely on hyperparameters, that are estimated through a maximum likelihood process for optimal denoising and interpolation. The approach, employing Gaussian and Matérn kernels, is tested on synthetic and real data with both an exhaustive search and genetic algorithms and is found to be superior to conventional beamformer MFI. It is also shown that the Matérn kernel, providing more degrees of freedom because of an increased number of hyperparameters, is preferable over the frequently used Gaussian kernel.