We present a numerical study of gravity impact on thermoacoustic heat pumping effects in a compact cavity used as a refrigeration device. More precisely, we show how gravity acts on the temperature distribution, on the mean temperature heat flux along the stack area and on flow dynamics. Studies are performed in a two-dimensional geometrical configuration which is simplified with respect to common experimental devices but sufficiently detailed to take into account the main physical mechanisms. Fluid motion, heat and mass transfer as well as compression/expansion effects are estimated from the computation of the Navier-Stokes equations in the low-Mach number hypothesis coupled with the heat equation in solid parts. The low-Mach number hypothesis is here relevant because the characteristic scale of the acoustic wavelength is much smaller than the geometrical length scales of the cavity. The operating mode is characterized by a moderate drive ratio, a fluid oscillating motion of moderate amplitude and fixed low frequency, typical of such devices. It is shown that when gravity is included, buoyancy effects modify the temperature and velocity fields as well as heat pumping efficiency.