When visiting in the SF area I used to stay in Newark, CA.
It seemed to be a bedroom community for Silicon Valley.
I think I paid $38/night around 2005 for a decent motel.
We now stay in Pacifica - FAR cheaper and easily accessible to SF.
Husband refused to go back - he hated it there, with a passion.