2 places come to mind: Lori's Diner and Osha Thai Noodle Cafe. I havent been to Lori's in a very long time and I remembering it being mediocre and overpriced, and I've never been to Osha Thai, but I would definitely choose that over Lori's.
I'll bet there are other places open late but I don't know what they are.
149 Powell St, San Francisco, CA 94102
Osha Thai Noodle Cafe
696 Geary St, San Francisco, CA 94102