In terms of location, it is "in the water", not "on the grass" or "in a tree" or "in the air" or "on a rock" or "on the cat's wrist". If you want to be precise, something "floating" is not "on the top of the water": it is partly below the surface (in the water) and partly above the surface (in the air).