[RPG] Can an elf be magically put to sleep using a Wish spell

dnd-5eelfracial-traitssleepwish

A defining characteristic of elves is that they cannot be put to sleep by magical means.

Fey Ancestry

You have advantage on saving throws against being charmed, and magic can’t put you to sleep.
(from D&D Beyond)

Does this mean that if a wizard used the wish spell to put an elf to sleep, the wish would fail?

Best Answer

It's up to the GM

A wish like this falls under this section:

You might be able to achieve something beyond the scope of the above examples. State your wish to the DM as precisely as possible. The DM has great latitude in ruling what occurs in such an instance, the greater the wish, the greater the likelihood that something goes wrong.

The question is simply: will something go wrong? Some possible rulings are:

This spell might simply fail, the effect you desire might only be partly achieved, or you might suffer some unforeseen consequence as a result of how you worded the wish.

Either failing or partly working could satisfy the Fey Ancestry feature (or one could rule that wish bypasses the feature), but I personally like the unforeseen consequence one. For example, maybe the wish summons an adult brass dragon that immediately uses sleep breath on the elf (dragon breath is not considered magical according to this Sage Advice article). Now you have a dragon who might not like being pulled from his home to settle your bet.