Take another look at the sentence:
The comma between sofa and William is completely correct. Since he was sound asleep on the library sofa is a subordinate clause, so it cannot stand alone. William was oblivious ... begins a main clause. When a subordinate clause introduces a main clause, you need a comma between them.