What happens to the energy in an ocean wave after it breaks on a reef or the shore?
This is an interesting article with some numbers for the energy in waves
A wave with a height of 2 m and a wavelength of 14 m breaking along 2 km of coastline (surface area = 32,000 m2) has approximately 45 kWh of energy.
How it will be dissipated will depend on the approach to the coast.
A wave as seen above will start losing energy by transferring it to kinetic and rotational energy at the shallow bottom including sand transfers, which finally will become heat (extra kinetic energy). As there will be conservation of momentum also, part of it will be absorbed by the impact on the earth, as vibrations which will also end up as heat, and also any dissipation in air as you observe. In the picture above sand will be continually deposited on the shore changing the shore line.
A wave hitting a rocky precipice will be transferring vibrations (finally heat) but also will erode part of the rock.
In the end all energy will end up as a higher temperature in the region and ground than if the ocean were calm.
When a wave breaks on the shore, most of the kinetic energy that was propagated in the wave goes into vigorously stirring up the water and mixing it with air as it runs up and then down the beach slope. In so doing it also shoves sand and pebbles around as pointed out by JMLCarter. The stirring action dissipates energy via the viscosity of the water, which warms up by a tiny amount, and that heat is then shared with the sand and air nearby.