Context : This paper presents the results obtained with the Multi-Unit Spectroscopic Explorer ( MUSE ) at the ESO Very Large Telescope on the faint end of the Lyman-alpha luminosity function ( LF ) based on deep observations of four lensing clusters . The goal of our project is to set strong constraints on the relative contribution of the Lyman-alpha emitter ( LAE ) population to cosmic reionization . Aims : The precise aim of the present study is to further constrain the abundance of LAEs by taking advantage of the magnification provided by lensing clusters to build a blindly selected sample of galaxies which is less biased than current blank field samples in redshift and luminosity . By construction , this sample of LAEs is complementary to those built from deep blank fields , whether observed by MUSE or by other facilities , and makes it possible to determine the shape of the LF at fainter levels , as well as its evolution with redshift . Methods : We selected a sample of 156 LAEs with redshifts between 2.9 \leq z \leq 6.7 and magnification-corrected luminosities in the range 39 \lesssim \log L _ { Ly _ { \alpha } } [ erg s ^ { - } 1 ] \lesssim 43 . To properly take into account the individual differences in detection conditions between the LAEs when computing the LF , including lensing configurations , and spatial and spectral morphologies , the non-parametric 1 / V _ { max } method was adopted . The price to pay to benefit from magnification is a reduction of the effective volume of the survey , together with a more complex analysis procedure to properly determine the effective volume V _ { max } for each galaxy . In this paper we present a complete procedure for the determination of the LF based on IFU detections in lensing clusters . This procedure , including some new methods for masking , effective volume integration and ( individual ) completeness determinations , has been fully automated when possible , and it can be easily generalized to the analysis of IFU observations in blank fields . Results : As a result of this analysis , the Lyman-alpha LF has been obtained in four different redshift bins : 2.9 < z < 6 , 7 , 2.9 < z < 4.0 , 4.0 < z < 5.0 , and 5.0 < z < 6.7 with constraints down to \log L _ { Ly _ { \alpha } } = 40.5 . From our data only , no significant evolution of LF mean slope can be found . When performing a Schechter analysis also including data from the literature to complete the present sample towards the brightest luminosities , a steep faint end slope was measured varying from \alpha = -1.69 ^ { +0.08 } _ { -0.08 } to \alpha = -1.87 ^ { +0.12 } _ { -0.12 } between the lowest and the highest redshift bins . Conclusions : The contribution of the LAE population to the star formation rate density at z \sim 6 is \lesssim 50 % depending on the luminosity limit considered , which is of the same order as the Lyman-break galaxy ( LBG ) contribution . The evolution of the LAE contribution with redshift depends on the assumed escape fraction of Lyman-alpha photons , and appears to slightly increase with increasing redshift when this fraction is conservatively set to one . Depending on the intersection between the LAE/LBG populations , the contribution of the observed galaxies to the ionizing flux may suffice to keep the universe ionized at z \sim 6 .