Remember that episode of Star Trek: TNG where Ryker gets the whole ship addicted to a VR game and it's up to Wesley to put an end to it? If you don't here's a refresher...
According to Kotaku, you can find the Ktarian headset in the mobile game Star Trek: Timelines (free to play) and slowly let your mind relax. As for how to unlock it? It sounds like it's more or less a random set of events that lead to it happening...
The episode this game is linked to has become one of my favorite Star Trek: TNG episodes to date. I love how back in the early 90s they somehow perfectly captured the addictive nature of mobile gaming and how it can grip even the sanest of individuals! Such a cool Easter Egg!