When talking about ongoing actions, the passato progressivo may be used instead of the imperfetto. This tense is formed by:
imperfetto of stare + the of the verb
Our example above would become:
Mentre stavo dormendo, il gatto è saltato sul letto e mi ha svegliato.
While I was sleeping, the cat jumped on my bed and woke me up.
To learn more, have a look at our post on the gerund in Italian!