I would suggest an alternative sentence that you did not mention. You should say:
I hope you slept well last night.
When using last night, which is a period of time relative to the current time, no preposition is necessary. This also works for some other units of time, such as last month and last week.
But be careful: the last X construction does not work for all units of time. Here are some exceptions:
- The day before the present day is called yesterday.
- The morning of the day before the present day is called yesterday morning.
- One hour before the present time is called an hour ago. You can specify any number of hours you want (two hours ago, three hours ago, etc.).
Examples:
I hope you did well in the job interview last night.
How was your vacation last week?
I hope he gave you the present I made for you yesterday.
I hope you looked after my son as I was out an hour ago.
And if you are talking about the present time, that doesn't take a preposition either:
I hope you slept well this night.
this night = "today's night"
You are only allowed to use prepositions in that sentence if you are talking about night in general, when no particular night has been specified. See these examples:
The nights here are very cold. I hope you sleep well at night.
The morning here is very hot. I hope you can sleep well in the morning.
John and Peter can't sleep at night because the night is cold. I hope they get used to this.
Thanks to Araucaria for pointing out the last day / yesterday error.