We present the deepest study to date of the Lyα luminosity function in a blank field using blind integral field spectroscopy from MUSE. We constructed a sample of 604 Lyα emitters (LAEs) across the redshift range 2.91 < z < 6.64 using automatic detection software in the Hubble Ultra Deep Field. The deep data cubes allowed us to calculate accurate total Lyα fluxes capturing low surfacebrightness extended Lyα emission now known to be a generic property of high-redshift star-forming galaxies. We simulated realistic extended LAEs to fully characterise the selection function of our samples, and performed flux-recovery experiments to test and correct for bias in our determination of total Lyα fluxes. We find that an accurate completeness correction accounting for extended emission reveals a very steep faint-end slope of the luminosity function, α, down to luminosities of log 10 L erg s −1 < 41.5, applying both the 1/V max and maximum likelihood estimators. Splitting the sample into three broad redshift bins, we see the faint-end slope increasing from −2.03 +1.42 −0.07 at z ≈ 3.44 to −2.86 +0.76 −∞ at z ≈ 5.48, however no strong evolution is seen between the 68% confidence regions in L * -α parameter space. Using the Lyα line flux as a proxy for star formation activity, and integrating the observed luminosity functions, we find that LAEs' contribution to the cosmic star formation rate density rises with redshift until it is comparable to that from continuum-selected samples by z ≈ 6. This implies that LAEs may contribute more to the star-formation activity of the early Universe than previously thought, as any additional inter-glactic medium (IGM) correction would act to further boost the Lyα luminosities. Finally, assuming fiducial values for the escape of Lyα and LyC radiation, and the clumpiness of the IGM, we integrated the maximum likelihood luminosity function at 5.00 < z < 6.64 and find we require only a small extrapolation beyond the data (< 1 dex in luminosity) for LAEs alone to maintain an ionised IGM at z ≈ 6.