We report on the influence of self-focusing and self-defocusing in the phase-mismatched frequency doubling crystal on the third harmonic generation (THG) efficiency in a two crystal frequency tripling scheme. By detuning the temperature of the doubling crystal, the impact of a phase-mismatch in second harmonic generation (SHG) on the subsequent sum frequency mixing process was investigated. It was found that adjusting the temperature not only affected the power ratio of the second harmonic to the fundamental but also the beam diameter of the fundamental beam in the THG crystal, which was caused by self-focusing and self-defocusing of the fundamental beam, respectively. This self-action was induced by a cascaded χ(2) : χ(2) process in the phase-mismatched SHG crystal. Self-defocusing was observable for positive detuning and self-focusing for negative detuning of the phase-matching temperature. Hence, the THG efficiency was not symmetric with respect to the point of optimum phase-matching. Optimum THG was obtained for positive detuning and the resulting self-defocusing in combination with the focusing lens in front of the THG stage was also beneficial for the beam quality of the third harmonic.