As already said, this is too powerful to allow it to happen. It would render all of your other players worthless, and after awhile the novelty of the power wore off even the wizard would likely stop having fun in a world that doesn't challenge him. this spell can not be granted as is.
The spell description clearly states that the more powerful a wish the more likely it is to go wrong, so you are clearly within your 'rights' to have things go wrong; and frankly something needs to go wrong since the spell can't be granted as is. The options have already been well listed, so I want to focus more on how to decide which to choose.
So the real question is what will fail. You have quite a bit of range in how genours, or evil, you choose to be at this point. Let's look at our options to see what we can do based off of how cruel you wish to be.
The boring option
The obvious default is to have the spell just fizzle and fail. This is within the realm of possibilities but is...well boring. It's not going to lead to any interesting (ie fun) play. I wouldn't recommend just fizzling by itself.
The one exception to this would be if the fizzle was only the first step in a larger story. Maybe the spell fizzled because a god of your world had to intervene to prevent a broken wish, and is now watching your group. Maybe the god is mad you tried to abuse the wish, maybe it's a trickster god that finds it interesting, maybe it's not a god but some powerful being that wishes to take advantage of any wizard foolish enough to make such a wish etc.
In other words, maybe the fizzle isn't just a fizzle, but a plot hook. If you take the time to tie the fizzle into your world/adventure and use it as a plot hook this could be a very interesting and satisfying option, especially if the wizard is granted some lesser boon at the completion of the plot hook, roughly equivalent to the power of a standard wish, as a reward for following up on the hook and a compensation for the lost wish.
Since I don't know your game, or even what realm your playing in, I can't give specific ideas on plot hooks. I'll say this could be the most rewarding answer, but only if you can think of a satisfying way to justify the fizzle leading to more interesting plot developments.
The lenient answer
The nicest option is to give a partial success. Let them get some lesser version of what they requested. so some options would be, in order of danger
- They can cast all spells < x level at will
- He can choose one or more spells a day to be able to cast at will, but he must spend a spell slot equal to 3 times the level of the spell (or some similar formula) per spell he wants to cast at will. Ie. basically give him some meta magic ability to cast spells at will. There is likely already a meta magic you can copy to decide how the formula should work, but since I'm less familiar with 5e I'm afraid I can't link you directly to the appropriate meta-magic.
- They can cast spells like a sorcerer without memorizing them first.
- They can cast spells at will, but they suffer int burn relative to the level of the spell (or some other penalty such that there is still an effective limit on how much they can actually cast)
- They can cast all spells at will, for one hour
- They can cast any spell at will, so long as the target of the spell is will
Though honestly 3 feels too powerful for a wizard to get, and 4 and below could all be abused by creative enough players, so I probably would only really consider option 1 or 2, maybe option 4 if I trusted my players, personally.
The problem with being too lenient is that you may set up expectations, that all wishes will be so nicely/benignly handled. This might tempt your players into making more overly-powered wishes, and have them complain if you aren't equally lenient in the future.
To minimize this risk I'd give them hints, both in game and out, that you were being very forgiving. Narrate the experience the wizard has as he feels power forced into his head, and the sensation that he is close to losing his mind from the experience. That he can't possibly keep the power forced into his head without loosing his mind, or something similar. Stress how close it came to being a bad end for him. Out of game I may simply say they were lucky you let him get away with it and you don't promise every wish will end this well.
There is a second potential issue with spending a wish to empower one player, and that is that it may make your other players less content. If you have only one wish and it is spent making one player better then by comparison the other players are less powerful. Depending on your players this may cause some discontentment. Arguably if your players allowed your wizard to spend a wish on empowering himself they shouldn't really complain if he was thus empowered, but they may not have realized the affect it would have on gameplay, or may have reasonable expected the wish to fail anyways.
One option is to spread the wish affect around, maybe allow all your casters to cast 1st level spells at will instead of allowing your wizard to cast 2nd level spells at will etc.
Lenient with a cost
Much like the above, you could give him a real benefit, but add a drawback. Arguable my option 2 and 3 from the above list already were this, but it's not much of a cost if it's a new ability the can choose to ignore if the cost is too high.
Some examples are
The player gains the ability to cast at will (or some variant from above list) but is driven mad by the revelation. Luckily it looks like 5e already has rules for madness you can use. Depending on how lenient you are you could affect them with short term madness, which is arguably not much of a penalty and serves as little more then a warning that they better not tempt fate; or long term madness. Notice long term madness can be removed by appropriate spells. If the player can't cast them yet they could get a quest/plot hook to find someone to cast it so this need not be a permanent penalty.
The player gains the ability to cast all spells at will, but loses access to their top two spell levels.
The player gains a spell book the can attune to with no spells, which they can attune to. They can cast any spell in the new spell book at will. But they can not memorize spells from both their old and new spell book, and using the new spell book comes with penalties (it can only memorize spells up to X level, perhaps it's an intelligent book with it's own agenda, maybe it's cursed etc)
Minor penalty, but recoverable
They forget all non-cantrips they had memorized currently, thus they can, for the rest of the day, cast all their spells at will. They can still memorize new spells as usual tomorrow.
They gain the ability to cast every spell at once. spells can not be targeted and doing this is likely suicidal; but hey they can do it!
They forget all non-cantrips at once, and their spell book disappears; but they are given a realatively easy quest hook to hunt down their spells.
For the rest of the day they can only cast spells if they target someone named will, the effect disappears after a long rest.
Really screw them over
- They lose all access to non-cantrips.
- They can only cast spells on someone named will.
How lenient you should be depends partially on your group and the type of game you are playing. If your wizard is an experienced gamer (ie, should really know better) and your playing an anyone-can-die sort of game then I suggest you really screw them over. Since they have 3 wishes they can use their second wish to fix what happened as a result of the first wish. This is a penalty of two wishes, a high penalty. However, experienced gamers should have known that a wish like this was likely to at best fizzle, and that it could easily be worse. IE they were asking for it and at least they have a way to reverse the damage done by the wish.
However, if your playing with a bunch of new novice players in a more lenient game you probably shouldn't punish them too much, or they will be afraid to use the rest of their wishes, they may even feel like it is you as the DM punishing them, even though the rules practically demand you not grant the wish. if your players are more interested in story then roll playing they may like a boon with an annoying penalty that they need to follow up on a plot hook to resolve.
If you go with a harsher option you may want to give them a "are you sure?" question before they do this, or something similar, to give them a subtle warning that they are gambling. Or even ask them to read over wish description themselves to make sure they see that part about the more powerful the wish the more likely it is to go wrong. That way when they are punished they can't say you didn't try to warn them.
Let the dice decide
This is my personal favorite answer, make them roll for it. Narrate the wizard mind being opened up to secrets of the universe that he can't possibly understand, and is struggling to retain what he is seeing without going mad. Then tell him to roll a D20 to see what happens.
- 20: He can pick from options 1-4 of the lenient list (...with the
possible exception of option 3; I still feel that may be too
powerful).
- 19-18: The human mind can only retain a fraction of what they were
taught without going mad, but they retain the ability to cast 2nd-level
and below at will.
- 17-16: Same as 19-18, but limited to 1st-level spells.
- 15-12: They gain the ability to cast 1st-level and below at will, but
suffer short-term madness from the experience.
- 12-10: They gain the ability to cast spells at will for half an hour,
and suffer short-term madness.
- 10-7: They forget all spells other than cantrips, but can always
memorize them again after a long rest.
- 7-4: They gain the ability to cast 1st-level spells at will, but
suffer indefinite madness (this could arguably be higher, depending
on how easy access to spells to cure madness is and/or how much your
table enjoys story-driven penalties like this).
- 3: They gain the ability to cast 1st-level spells at-will if
targeting a person named Will for half an hour, and suffer long-term
madness.
- 2: They gain the ability to cast 1st-level spells at-will if
targeting a person named Will for half an hour, and suffer indefinite
madness.
- 1: They permanently lose all spells except for cantrips.
This is obviously an example, you can tweak how lenient you are depending on your players and the type of game you play. You may want to replace permanent madness with some other penalty depending on how much your players would be willing to play a flaw like this, some would find it fun RP and some would complain about loosing agency of their character so judge your own party and if necessary use one of the other penalties as appropriate.
I'd argue the above table is pretty lenient, I could see arguments for a much harsher table that only gives a permanent boon on a 18 above, or even 20, and most of the other results are just finding out how royally screwed the player is. After all an experienced player should know that this wish can't be allowed to succeed, and thus the rules encourage the DM to screw with them if they try it.
I like this option because it makes it clear that your players are gambling with their wishes and things can go wrong. If they roll poorly and get screwed over, well it's not DM fiat that they can complain about, it was luck if the die. Likewise if they roll high and get a lenient result they aren't guaranteed to get that good a result in the future, so they can't complain if you decide to punish them for a different overly-ambitious wish later. Plus, what player doesn't like to gamble their lives on a d20 roll? Isn't that the spirit of D&D :)