We present an XMM-Newton time-resolved spectral analysis of the Narrow Line Seyfert 1 galaxy Mrk 766 . We analyse eight available observations of the EPIC-pn camera taken between May 2000 and June 2005 in order to investigate the X-ray spectral variability as produced by changes in the mass accretion rate . The 0.2 - 10 keV spectra are extracted in time bins longer than 3 ks to have at least 3 \times 10 ^ { 4 } net counts in each bin and then accurately trace the variations of the best fit parameters of our adopted Comptonisation spectral model . We test a bulk-motion Comptonisation ( BMC ) model which is in general applicable to any physical system powered by accretion onto a compact object , and assumes that soft seed photons are efficiently up-scattered via inverse Compton scattering in a hot and dense electron corona . The Comptonised spectrum has a characteristic power-law shape , whose slope was found to increase for large values of the normalisation of the seed component , that is proportional to the mass accretion rate \dot { m } ( in Eddington units ) . Our baseline spectral model also includes a warm absorber lying on the line of sight and radiation reprocessing from the accretion disk or from outflowing matter in proximity of the central compact object . Our study reveals that the normalisation-slope correlation , observed in Galactic Black Hole sources ( GBHs ) , also holds for Mrk 766 : variations of the photon index in the range \Gamma \sim 1.9 - 2.4 are indeed likely to be related to the variations of \dot { m } , as observed in X-ray binary systems . We finally applied a scaling technique based on the observed correlation to estimate the BH mass in Mrk 766 . This technique is commonly and successfully applied to measure masses of GBHs , and this is the first time it is applied in detail to estimate the BH mass in an AGN . We obtain a value of M _ { BH } = 1.26 ^ { +1.00 } _ { -0.77 } \times 10 ^ { 6 } M _ { \odot } that is in very good agreement with that estimated by the reverberation mapping .