This paper reports results from numerical simulations of the gravitational radiation emitted from non-rotating compact objects (both neutron stars and Schwarzschild black holes) as a result of the accretion of matter. We adopt a hybrid procedure in which we evolve numerically, and assuming axisymmetry, the linearized equations describing metric and fluid perturbations coupled to a fully nonlinear hydrodynamics code that calculates the motion of the accreting matter. The initial matter distribution, which is initially at rest, is shaped in the form of extended quadrupolar shells of either dust or obeying a perfect fluid equation of state. Self-gravity of the accreting layers of fluid is neglected, as well as radiation reaction effects. We use this idealized setup in order to understand the qualitative features appearing in the energy spectrum of the gravitational wave emission from compact stars or black holes, subject to accretion processes involving extended objects. A comparison for the case of point-like particles falling radially onto black holes is also provided. Our results show that, when the central object is a black hole, the spectrum is far from having only one clear, monochromatic peak at the frequency of the fundamental quasi-normal mode. On the contrary, it shows a complex pattern, with distinctive interference fringes produced by the interaction between the infalling matter and the underlying perturbed spacetime, in close agreement with results for point-like particles. Remarkably, most of the energy is emitted at frequencies lower than that of the fundamental mode of the black hole. Similar results are obtained for extended shells accreting onto neutron stars, but in this case the contribution of the stellar fundamental mode stands clearly in the energy spectrum. Our analysis illustrates that the gravitational wave signal driven by accretion onto compact objects is influenced more by the details and dynamics of the process, and the external distribution of matter, than by the quasi-normal mode structure of the central object. The gravitational waveforms from such accretion events appear to be much more complex than former simplified assumptions predicted.