我看书的时候睡着了。

I fell asleep while reading.

While reading a book, I fell asleep.

Source: Tatoeba

Sentence Composition