If the creature targeted by Sleep with the Fishes isn't a legal target at the time it would resolve, Sleep with the Fishes is put into its owner's graveyard from the stack. It's not put onto the battlefield and then put into their graveyard. Notably, this means that its controller will not create a Fish token.

Artwork
Loading artwork…
Sleep with the Fishes
Streets of New Capenna · #61 · EN
Nonfoil—Foil—
Card rules
Enchant creature
When this Aura enters, tap enchanted creature and you create a 1/1 blue Fish creature token with "This token can't be blocked."
Enchanted creature doesn't untap during its controller's untap step.
Uncommon · Illustrated by Randy Gallegos
Format legality
Brawl Legal
Commander Legal
Competitive Brawl Legal
Duel Legal
Gladiator Legal
Historic Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Penny Legal
Pioneer Legal
Timeless Legal
Vintage Legal
Alchemy Not Legal
Future Not Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander Not Legal
PreDH Not Legal
Premodern Not Legal
Standard Not Legal
Standard Brawl Not Legal
Tlr Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions