We study the statistical properties of the variation of the kinetic energy of a spherical Brownian particle that freely moves in an incompressible fluid at constant temperature. Based on the underdamped version of the generalized Langevin equation that includes the inertia of both the particle and the displaced fluid, we derive an analytical expression for the probability density function of such a kinetic energy variation during an arbitrary time interval, which exactly amounts to the energy exchanged with the fluid in absence of external forces. We also determine all the moments of this probability distribution, which can be fully expressed in terms of a function that is proportional to the velocity autocorrelation function of the particle. The derived expressions are verified by means of numerical simulations of the stochastic motion of a particle in a viscous liquid with hydrodynamic backflow for representative values of the time-scales of the system. Furthermore, we also investigate the effect of viscoelasticity on the statistics of the kinetic energy variation of the particle, which reveals the existence of three distinct regimes of the energy exchange process depending on the values of the viscoelastic parameters of the fluid.