1710, "garment worn by a woman at night," from night (n. ) + shift (n.2). The meaning "gang of workers employed after dark" is attested from 1839, from shift (n.1).
nightmare
nightmarish
night-night
night-owl
nightshade
night-shift
nightspot
nightstick
night-time
night-watch
night-work