Jean Valjean finds the address that Marius scratches into the garden wall at Valjean's house on the Rue Plumet soon after having seen Thenardier in London. Valjean feels threatened by Thenardier who can identify Valjean to Inspector Javert; plus, Valjean knows that a group of thugs have tried to rob the house. Therefore, when Valjean sees the address etched into the wall, he immediately feels that his house has been intruded upon and that there is a threat to both himself and Cosette, which he wants to spare Cosette from learning about. The result is that he moves Cosette away from the Rue Plumet sooner than she had anticipated. The irony in the situation is that when Marius goes to the Rue Plumet and finds her having been taken from him, he wants to die and goes to join his friends at the barricades. Valjean had known that a man was falling in love with Cosette because he had seen Marius, even though he has never met him. Having a man fall in love with Cosette is one of his greatest fears because to him it means that Cosette would be taken away from him through marriage to a husband. Therefore, removing Cosette from Marius and inspiring Marius to take his own life is, ironically, exactly what Valjean in his darker moment would want. We learn that Marius's death is, in his darker moment, exactly what Valjean would want when he reads Marius's letter to Cosette delivered by Gavroche. Valjean's first instinct is to feel joyful that Marius has gone to the barricades to fight and surely be killed because now he is free to continue to have Cosette for himself, as we see in the lines:
He uttered a frightful cry of inward joy ... That man had taken himself off of his own accord, freely, willingly. This man was going to his death, and he, Jean Valjean, had had no hand in the matter, and it was through no fault of his. (Vol. 4, Bk. 15, Ch. 3)
However, we know Valjean's goodness of character well enough to believe that he would not stick with these initial feelings. True to his character, Valjean realizes he could never keep from Cosette someone she loves and goes off in his National Guard uniform to find Marius and bring him safely to Cosette. In fact, Valjean finds him wounded and dying at the barricades and carries him all the way home through the sewers of Paris, saving his life. Therefore, the further irony of Valjean having seen Marius's address is that, not only does taking Cosette from Marius make Marius want to die as Valjean would want it in his temporarily darkest moment, it actually also leads to Valjean saving Marius's life, bringing Marius to Cosette, which is the one thing Valjean dreads most because he can't bare to lose her.
Therefore, finding Marius's address is ironic because it leads to both the threat of Marius's life as well as Valjean saving Marius's life, even though he wants Cosette all for himself.