I was watching TV for two hours last night.

Literal

I [topic-は] last-night two-hours TV [object-を] was-watching.

~ていた marks past ongoing action. 昨夜 (さくや or ゆうべ, 'last night'). 2時間 is a duration expression — no particle needed for durations modifying the verb directly.