For me, it seems to happen most often when I remember a certain word or phrase in English only, which causes my thought stream to switch languages.
The thing is, nowadays I read and write much more in English than in my native tongue, so there's an ever-increasing amount of things I default to thinking about in English. I also tend to switch languages on the fly in my thoughts, depending on which one "feels" better at any given moment.
The turning point where I started thinking in English increasingly was when I stopped watching TV shows and movies dubbed and went looking for the original version instead.
Curiously, I noticed that I still prefer to have subtitles on original versions. Not in my native tongue, but in English. Besides not missing some unintelligible dialogues, I found it reduces the feeling of cognitive load for me when watching a movie.