I’ve experienced a number of them and never felt anything leading up to them.
The last decent one I can remember was a few years ago around maybe 2 or 3 AM and made my apartment roll back and forth. The rolling woke me up but my partner slept through it. And I tried not to panic so they could just sleep through it, hoping it would end soon.
Also, we didn’t have anything hanging or that could easily fall onto our bed in the bedroom so I think staying in the bed was an okay move.
I live in a single family home now even higher up the Twin Peaks area of SF so who knows how this house will handle the next one. Hopefully it won’t be too bad. At least the ground is solid and not considered a liquefaction zone. And my new neighbors seem to have some kind of thing going on where they stock first aid supplies for first responders in disasters which seems nice and thoughtful.
Though I just don’t understand why SF won’t use our missile warning system for earthquake warnings. Seems like they could make a special earthquake tone and warn everyone if one happens in another city and is heading our way. Even seconds of warning would be so helpful. Could be the difference in being able to jump under a table or desk vs. getting crushed by falling stuff.