My first thought would be the 02 sensor. When it happens again, try unplugging the 02 sensor and see if that changes things. Do a search in the archives (02 is too short to search on, so try 'oxygen sensor').
1988 560SL Black/Palomino
1988 300SEL Black Pearl/Burgandy
1984 500SEC Anthracite Grey/Palomino