So far, playable races that don't sleep explicitly also can't be put to sleep by magic:
Warforged Constructed Resilience: "You don't need to sleep, and magic can't put you to sleep."
Elf Trance: "Elves do not sleep." with Elf Fey Ancestry: "...magic can't put you to sleep."
However, the recently released autognome breaks this trend. It only says:
Autognome Sentry's Rest: "When you take a long rest, you spend at least 6 hours in an inactive, motionless state, instead of sleeping. In this state, you appear inert, but you remain conscious."
Does this mean that autognomes can be put to sleep by magic, even though they don't ever experience sleep naturally?