Hold L2 for your left hand or R2 for your right, then flick the corresponding analogue stick in the opposite direction and back.
The timing is the whole trick — a sharp flick lands the slap, a slow one just looks like a wave.