Answer:
In the middle of the night Robert came up with a good idea for his next essay. 
O In the middle of the night, Robert came up with a good idea for his next essay. 
O In the middle of the night; Robert came up with a good idea for his next essay. 
In the middle of the night, Robert came up with a good idea for his essay.
Step-by-step explanation: