Since having kids and paying for sitters, we tend to not stay out till the wee small hours any more.
Round here though, lots of people have family to park the kids with so they stay out much later
Is it more polite to
(a)find the hosts to thank them and say goodbye (but risk drawing attention to the fact that the party's breaking up- recently had someone say "oh no, you're not going HOME?)
or (b) just slip into the night but be sure to thank them after then party?