Ответ:

The action was in progress when another past action happened, so we use the Past Continuous: was sleeping.

He was sleeping when I came.