We develop a semi-analytic formalism for the determination of the evolution of the stellar mass accretion rate for specified density and velocity profiles that emerge from the runaway collapse of a prestellar cloud core. In the early phase, when the infall of matter from the surrounding envelope is substantial, mass is transported inward because of envelope-induced gravitational instability in a protostellar disk. In this phase, we model the mass accretion rate assuming isothermal free-fall collapse of a molecular cloud core that feeds the disk, and episodic gravitational instability and mass accretion bursts according to the Toomre Q criterion. In the late phase, when the gas reservoir of the envelope is depleted, mass is being accreted onto the star due to gravitational torques within the disk, in a manner that analytic theory suggests has the form ∝ t-6/5. Our model provides a self-consistent evolution of the mass accretion rate by joining the spherical envelope accretion (dominant at the earlier stage) with the disk accretion (important at the later stage), and accounts for the presence of episodic accretion bursts at suitable times. We compare our semi-analytic results with that of a numerical model for mass accretion described in Vorobyov & Basu (2007). The burst modes may hold the key to explaining the long-standing ‘luminosity problem’. We investigate whether the bursts are needed to provide a good match to the observed distribution of bolometric luminosities of YSOs, or alternately whether the overall declining profile of the mass accretion rate is enough to give a good fit to the luminosity distribution.