YOU SAID:
yesterday I slept in class
INTO JAPANESE
昨日、私は授業中に寝た
BACK INTO ENGLISH
I went to bed in class yesterday.
INTO JAPANESE
昨日授業中に寝た。
BACK INTO ENGLISH
I went to bed in class yesterday.
That didn't even make that much sense in English.