Your question makes me think about whether or not the statement is really true that waves are bigger over rocks than over sand. I have not noticed this myself, but I have a couple ideas as to why it might be true:
1) The question may be better answered if it is twisted around: Why are there rock underneath big waves and sand under small waves? In other words, the size of the waves has an effect on the stuff underneath, rather than the stuff underneath having an effect on the size of the waves. Can you think of why there might be rocks under large waves and sand under small ones?
2) Perhaps the stuff under the waves really does have an effect on the wave size. As waves pass over sand, some of the energy of the wave will go into sloshing the sand back and forth. This will decrease the energy of the wave and make it smaller.
Can you think of any other properties of a beach that could affect the size of waves?
Can you give some examples of beaches where the waves are large over rocks and beaches where the waves are smaller over sand?
I hope this helps!