The ability to extend the time scale of the coherent optical response from large ensembles of quantum emitters is highly appealing for applications in quantum information devices. In semiconductor nanostructures, spin degrees of freedom can be used as auxiliary, powerful tools to modify the coherent optical dynamics. Here, we apply this approach to negatively charged (In,Ga)As/GaAs self-assembled quantum dots which are considered as excellent quantum emitters with robust optical coherence and high bandwidth. We study three-pulse spin-dependent photon echoes subject to moderate transverse magnetic fields up to 1 T. We demonstrate that the timescale of coherent optical response can be extended by at least an order of magnitude by the field. Without magnetic field, the photon echo decays with T2 = 0.45 ns which is determined by the radiative lifetime of trions T1 = 0.26 ns. In the presence of the transverse magnetic field, the decay of the photon echo signal is given by spin dephasing time of the ensemble of resident electrons T2,e ∼ 4 ns. We demonstrate that the non-zero transverse g-factor of the heavy holes in the trion state plays a crucial role in the temporal evolution and magnetic field dependence of the long-lived photon echo signal.