I went to sleep around midnight.

Literal

Night [gen-の] 12 o'clock approximately, I [topic-は] slept.

ごろ ('approximately, around') is specifically used with time expressions — contrasts with くらい/ぐらい ('about, approximately') for quantities. '時ごろ / 時半ごろ' is the standard 'around X o'clock' form.