We study experimentally the propulsive dynamics of flexible undulating foils in a self-propelled swimming configuration near a wall. Measurements of swimming speed and propulsive force are performed, together with full recordings of the elastic wave kinematics and particle image velocimetry. We show that the presence of the wall can enhance the cruising velocity in some cases up to 15%. The physical mechanism responsible for this augmentation is first discussed qualitatively by studying the vorticity dynamics in the wake. A quantitative picture of the problem is then established using a POD analysis of the velocity fields in the wake, showing that the first POD mode is a good indicator of the kinetic energy in the propulsive jet.