It really works in the musical. I remember when I saw it and he begins the small verse that would reveal his past crimes... I remember saying to myself, "you don't have to tell." And if he wanted only his happiness, he did not. But he wanted Cosette's happiness more, so he had to.
Sydney Carton has the same sacrifice. Because he is Charles Darnay's exact duplicate, he will exchange himself for Darnay and go to the guillotine in Darnay's place so Lucie Manette can be happy.
Samwise Gamgee's sacrifices abound throughout LOTR. In fact, he is far more interesting to read than Frodo, Aragorn, and Gandalf.
You can see Tolkien's love of ordinary folk in the way he writes all the hobbits, but especially Sam...the heroic gardener. Though I must admit, one of my favorite lines from the books (and the films) was:
"...Go back to the shadow. The dark fire will not avail you, flame of Udun! You cannot pass!"
Fully prepared to make his own sacrifice, Gandalf draws a line in the sand against the Balrog of Morgoth.