Minuit can be split into MI+NUIT. MI means middle here. NUIT means night. So the middle of the night.
Midi can be split into MI+DI. DI means day (think of the name of the days of the week: lunDI, marDI, mercreDI...).
You can find MI in other expression, like MI+name of a month = in the middle of the month, e.g. à la mi-juin = in the middle of June.
Another easy way to remember:
MiNuit = Middle of the Night
MiDi = Middle of the Day