Does that affect the floor of the castle or just the ground where the castle is floating on?
Does it depend on what the caster wants?
Does it depend on if the caster can/cannot see the "real ground"?
Considering it causes a highly localized tremor, I don't see why it wouldn't work on a floating castle. Magic!
Looks like there's nothing written that says whether it can or can't. So let the player justify it, and let the DM decide.