Take another look at the sentence:
The comma between classmates and who is completely correct. William was oblivious to his twenty-eight algebra classmates is a main clause. A main clause can stand alone as a complete sentence. Who were sweating, sighing, and wracking their brains is a relative clause. Relative clauses are not complete sentences; you must attach them to main clauses, as the example above does.
Generally, when a subordinate clause follows a main clause, you need no punctuation. Notice, however, that a comma connects the relative clause that begins with who to the main clause in front. In this example, the who clause is nonessential. We know which classmates we are talking about: the twenty-eight that William has taken algebra with all semester. Because the clause in nonessential, a comma is appropriate. Read Comma Tip 5.