Based on the quasi-linear kinetic theory of statistical Alfvén acceleration a quantitative investigation of the possibility of relativistic electron acceleration by magnetic pumping on the tail magnetopause is considered in the paper. This theory is used for the explanation of long duration electron flux enhancements with assumption that the magnetic pumping is activated by the geomagnetic substorm activity during the recovery phase of magnetic storms. An analytical expression for average acceleration time is obtained. It is shown that the magnetic pumping with period ~1 hour in the outer magnetosphere provides the gradual (several days) electron acceleration up to energy ~10 MeV. The energetic spectrum of the accelerated electrons is calculated with an assumption that the electrons escape from the acceleration region. The dependence of the electron energetic spectrum shape on the relation between escaping and acceleration times is studied. Relativistic electron enhancements in the magnetosphere in March-June 1994 from CORONAS-I data is presented. The dynamics of L-distribution of the relativistic electron intensity is superimposed to the solar wind and magnetosphere variations. Comparison of the experimental data with theoretical results is performed.