This was something that confused me until I got a FreeStyle Libre and could see exactly what was happening. Turns out that sometimes (not always) my blood sugar had not reached the peak after two hours.
Hence sometimes, when I had a late meal, (say 9pm) I would test my blood sugar after two hours and it would be below 7, and I would go to bed and my blood sugars to continue to rise for another hour or two and then start to fall slowly, but they could still be above 7 when I tested in the morning.
But as others have said, there are other possible reasons.