8 years ago, a video on HQ-9 hitting a supersonic sea skimming missile. There are a few similar old videos, mostly 5 to 10 years old showing Air defense missiles diving from a height onto a target near the sea surface.
For an air to air missile to hit a surface or near surface object, the target must emit high heat signature vs its surrounding, in the case the sea surface. Thus the probability of scoring a hit may not ba as satifactory as against an aerial target. Also the warhead on an AAM is relatively small against SAM ang SSM.
Thus AAM can hit a sea surface target provided the target emits high enough heat signature or the radar seeker head of the missile can track radar reflects off the target and differentiate it against the sea clusters. Whether the AAM can achieve a kill is thus depending on a variable of factors from seeker head sensitivity, targeting software, ambient temperatura at sea level etc.
Any way AAM are not ideal weapon against surface or near surface target, it is doable but not guarantee that it will score a hit. IMO HQ-9 which is a SAM, is an exception.