Police say Steven Padilla came out of the restaurant's bathroom and started stabbing 65-year-old Jose Arias, who appeared to be sleeping while sitting at a nearby table.
Arias staggered outside and collapsed on the sidewalk as stunned customers looked on. Medics responded and put Arias in an ambulance, but he died before they could take him to the hospital.
Investigators say Padilla took off running down 24th Street but was caught in the parking lot outside a nearby Safeway store and taken into custody after several customers called 911.
Padilla is now being held on $1 million bail. His arraignment is set for Sept. 3.
Prosecutors say Padilla had a number of prior convictions for assault over the past 11 years.