What happens is, if you play Tetris or other games featuring moving pieces, your brain continues to visualize the blocks after you have stopped playing. The moving pieces will show up when you close your eyes to go to sleep.
Although it's been years since I played Tetris, I can vouch for this effect in a game I do play on Facebook, Zuma Blitz. Those circling gems keep moving in my head long after I've stopped playing. What I've learned to do is only play for a short time and never in the evening. Hard to do with a very addictive game.