I usually park in Martinez: free; some spots right in front of the depot and others very close; small town with pedestrians walking their dogs and kids all times of day and night. Sacramento is safe but no longer free. Oakland was working on their lot last time I was there, don't know what it is like now. When I'm leaving from there, I park in a friend's backyard and take transit. Emeryville has a paid lot, looks safe, I've only stopped there to watch trains and then I park on the street.
None of these are indoor. If indoor is important, you might investigate hotels that allow parking for SFO airport travelers (I've heard of these, never tried one, and you'd still have to get back to Amtrak). SFO has some covered parking. Some SAC parking is under the freeway near the rail museum, but I'd consider it less safe than the parking right by the depot. Downtown Oakland has some parking structures with monthly rates. Perhaps run an ad in craigslist looking to rent a private garage?