Generally, under the UCC, there is a statute of limitations of six (6) years (§3-118):
This limitation tends to run from the due date of any scheduled payment. Where a note calls for regular monthly payments, the limitation would be applied as to each payment as it comes due.
However, the Lender's valid acceleration of the principal balance after default renders the entire balance to be due and payable. So after acceleration, this period would begin to run on the full accelerated amount outstanding.
For this reason, it is critical that a borrower keep any notice of acceleration, as this is the trigger to the application of limitations to the full amount.
The precise wording of this section and application of limitations varies from state to state. For example, in Texas limitations for a note secured by a deed of trust is only four (4) years rather than six.
In California, that state's UCC section relating to limitations of a negotiable instrument is set forth within California Commercial Code Section 3118:
Note that California's numbering scheme differs from the national UCC, while still preserving the national UCC schema (3118 versus §3-118).
I do not know if there is some other statutory limitation provision in California which relates to deeds of trust in that state.