Even though it's very thoughtful and kind of you to cater to the friends your roommate leaves high and dry, I think you should not be made responsible for continuing hosting duties for someone else's abandoned friends.
Maybe I'm just old fashioned, but I think that in some circumstances it can still be considered a wee tad bit rude, even in the 21st century, for your friend to just leave his friends sitting there, while he goes to bed. At the very least he should announce to them, "Well everyone I'm going to have to kick you out for tonight, but it's been fun dudes." They're his guests and his responsibility.
Or -- if it's all extremely casual, and he doesn't mind the friends letting themselves out when they're ready to go, and they feel comfortable about that too, then I think you have no further obligation to stick around for them.
Even though I think your roommate is being kind of rude to just abandon them in the living room, in a kind of weird logic, I actually don't think it would be rude for you to do what you want and go away too. Because your roommate is the one whose friends they are, and it's not your responsibility to cater to them if he has abandoned them and gone to bed.
You're very sweet to try to pick up the hosting duties, but unless you're actually having a good time yourself with the friends, I don't see why you shouldn't also just go to bed or do what you want to do, and let them know to let themselves out.
.