40-60 ride out of SF? AC Transit Lines 800–899 are All Nighter lines, operating from 1 a.m. – 5 a.m. daily. Some may operate somewhat earlier or later (especially on weekends).
They do, but it's hilariously slow. It's so slow that it's often actually faster to wait for the next morning's Caltrain.
SamTrans runs all-night bus service from SF to Palo Alto, route 397. Once per hour, and the ride takes 2 hours, 15 minutes (!). From there you can switch to the all-night VTA route 22, which goes Palo Alto to San Jose. That's also approximately once per hour, and the trip takes about 1 hour, 15 minutes. With the connection time, you can make the overall trip in about 4 hours.