Bernie was writing a new fantasy novel.
When he woke up he finished the chapter with what he'd dreamt.
Bernie's wife fell asleep while he was writing and had a dream.
He fell asleep while writing and had a dream.