Minecraft.
I have this problem with video games, where if I play them when tired my mind starts temporarily using said game's logic to think. It's usually when doing one repetitive thing, like creating mineshafts in Minecraft. When I get to bed, my brain's still using said game's logic, and I begin to plunge into an over-analyzing mess of chaos and turmoil that seems to last forever.
Got like three hours of sleep last night, surprisingly.
This also seems to happen when listening to breakcore before bed. Just a five second loop of a track playing in my head for hours. Over and over and over.
Fuck.