I have memories of what I think was a full novel, but might have been a short-story/novella.
A scientist has discovered either a new sub-atomic particle, or a way to isolate a known particle, and a way to inject these particles directly into the brain, whereupon for some sort of technobabble reason, wishes become reality. It comes in three colors, and each color can only be used once.
The first time they use the machine/particles, everyone on earth gets their wish fulfilled. There are scenes where a character is walking home after this first wish, and he gets to a train station that has been turned into crystal, because the guy who works there thought that would look beautiful. There are people who wasted their wish on cash, or gold, which is now worthless, because so many other people wished for the same thing.
I think the second wish is used by a 'bad' guy(s), and the final wish, there is only enough of the last color of magic particle that only one person gets to make a wish and resets the world to pre-wishes state.