noun, adverb
all night; the whole night
Refers to the entire duration of the night, from evening to morning. Often used adverbially with に or without a particle.
昨夜は夜中に雨が降っていた。
It rained all night last night.
彼は夜中働いた。
He worked the whole night.
夜通し also means 'all night', but emphasizes continuity throughout the night, often for activities like studying or driving. 夜中 focuses on the entire night as a time span.
一晩中 is a more common and colloquial way to say 'all night long'. 夜中 is slightly more formal or literary.
Compound of 夜 (yo, 'night') and 中 (jū, 'throughout'). The reading よじゅう is a regular rendaku-influenced form of よちゅう.