The only alien survivor of an invasion that forced him into relocation, Jean-Luc/Ethan was the form the alien, Barash, assumed while creating a fantasy world. He created this world using the scanners his mother left for him on Alpha Onias III, as means to give Barash anything he wanted.
When the Riker-lead away mission to Alpha Onias III was compromised, leaving an unconscious Riker on the planet, Barash used his scanners to create a fantasy world for Riker. Set 16 years in the future, where Riker is captain of the Enterprise-D, Barash posed as Captain Riker's son, Jean-Luc, named after the now-Admiral Picard.
When Riker figured out the charade, Barash duped Riker yet again, this time using the scanners to convince Riker that he was a prisoner on a secret Romulan base, along with Ethan -- Barash's new identity. When Riker confronted Ethan, Ethan reverted to his true, alien form, and told Riker that he was lonely and only did what he did for companionship. With that, both Riker and transport hand-in-hand back to the Enterprise.