See the article Dreamy's Pen Pals at Smurfs Wiki.
"Dreamy's Pen Pals" is a story event that took place some years before Empath's final return from Psychelia. Some time after the events of "The Astro Smurf", Dreamy started writing letters to the Swoofs in the hopes of hearing from them and hoping to see them again. Courier Smurf ends up showing one of these letters to Papa Smurf, and the other Smurfs start seeing Dreamy becoming disappointed from never hearing back from the Swoofs.
Papa Smurf decided that he and his other little Smurfs will help make Dreamy's wish come true, although he would not take the Smurfs back to the extinct volcano in order to do so. Instead, Papa Smurf had a spell cast around the entire village that created a "reality bubble" that transformed the entire village into the Swoof Village. The spell was cast after Dreamy had entered his spaceship and pedaled away until he fell asleep.
However, because the "reality bubble" spell was so complex, Brainy had cut some corners in completing the spell, which had the effect of making the spell cast around the village to lose its effect much sooner than Papa Smurf had hoped for, which made Dreamy realize that he had never actually met the Swoofs because the Swoofs were actually the Smurfs. This disappointment led to the situation in his life that took place in the fanfiction story, "Where No Smurf Has Gone Before".
The story event is based on the episode of the same name from Season 5 of the Smurfs cartoon show.