Overnight is one word when it functions as an adjective or adverb, as in these examples:
Cover and refrigerate overnight. [Mommy's Kitchen]
His Olympic super-combined originally was set for Tuesday but an overnight snowstorm forced organizers to push the race back to Sunday. [Associated Press]
This covers most instances in which the words over and night work together. The two-word phrase over night is reserved for constructions such as I prefer day over night, but these don’t come up often.