CONTACT: 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 ≤ z ≤ 6.7 and magnification-corrected luminosities in the range 39 ≲ log L_{L_{y}_{a}} [erg s^{-1}] ≲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_{L_{y}_{a}} = 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 α = −1.69_{-0.08}^{0.08} to α = −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 ∼ 6 is ≲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 ∼ 6