From my eyes, Revan recovered his full memories after KOTOR 1 (a month or two after) and then he remembered Malachor, and what threat could come out of that, I suppose. He went there again (before KOTOR 2, but after KOTOR 1) and then went somewhere else after that.
This is what I have gathered from beating the game three times, it's not speculation.