The production of the excited charm mesons D_1(2420) and D^*_2(2460) in ep collisions has been measured with the ZEUS detector at HERA using an integrated luminosity of 373 pb^{-1}. The masses of the neutral and charged states, the widths of the neutral states, and the helicity parameter of D_1(2420)^{0} were determined and compared with other measurements and with theoretical expectations. The measured helicity parameter of the D^0_1 allows for some mixing of S- and D-waves in its decay to D^{*±}π^{∓}. The result is also consistent with a pure D-wave decay. Ratios of branching fractions of the two decay modes of the D^*_2(2460)^0 and D^*_2(2460)^{±} states were measured and compared with previous measurements. The fractions of charm quarks hadronising into D_1 and D^{*}_2 were measured and are consistent with those obtained in e^+ e^- annihilations. ; Comment: 31 pages, 6 figures