Even around me in Dot I can think of multiple places serving full menus until 11pm, and late night menus until closing (1-2am). Downtown even more so, along with Chinatown until 3-4am, etc. I would agree that SF sucks about as badly as Boston does (or worse) for night life hours.
The only places I can think of downtown serving that late:
1. South St diner (bad, unless you're drunk)
2. 4th Wall
3. Golden Gate and a few other Chinese places
4. NY Pizza (2-3am) and Boston Kitchen Pizza (midnight)
5. Maria's Taqueria (11pm to 1am depending on how busy it is it seems)
6. Halal Guys (midnight)
Mostly fast-food options. It's pathetic. Not to mention there's a lot of places that say they serve until 10-midnight but god help you if you order from them close to that time because they usually want to shut the kitchen down so you're gonna get the evil eye from the bartender/waiter.
It's also fucking mind boggling to me that at 2am in the theater district with all the bars closing there is exactly one food place open: NY Pizza.