Complex interactions between cellular systems and their surrounding extracellular matrices are emerging as important mechanical regulators of cell functions such as proliferation, motility, and cell death, and such cellular systems are often characterized by pulsating acto-myosin activities. Here, using an active gel model, we numerically explore the spontaneous flow generation by activity pulses in the presence of a viscoelastic medium. The results show that cross-talk between the activity-induced deformations of the viscoelastic surroundings with the time-dependent response of the active medium to these deformations can lead to the reversal of spontaneously generated active flows. We explain the mechanism behind this phenomenon based on the interaction between the active flow and the viscoelastic medium. We show the importance of relaxation timescales of both the polymers and the active particles and provide a phase-space over which such spontaneous flow reversals can be observed. Our results suggest new experiments investigating the role of controlled pulses of activity in living systems ensnared in complex mircoenvironments.