Cafe that opens 8PM+ between Mountain View and Campbell
Coffee Society on Stevens Creek Blvd in Cupertino is open relatively late (I haven't been there in a long time but I used to like going there when I was in the area). Good espresso drinks and pastries, free wi-fi, a little loud though. I just called them to get their hours:
Mon-Thu: 6am - 11pm
Fri: 6am - 11:30pm
Sat: 7am - 11:30pm
Sun: 7am - 11pm
21265 Stevens Creek Blvd, Suite 202
Cupertino, CA 95014
(they have other locations but those close earlier).
I've also heard good things about Barefoot Coffee Roasters in Santa Clara but I haven't been there.