Why does wind blow offshore in the morning?
The phenomenon you describe is denoted as a land breeze. It is caused by a difference between the sea surface temperature and the land surface temperature.

Surface Temperature

During day time the surface temperature at land rises faster than the sea surface temperature, whereas during night time the land surface cools faster than the sea surfaces. As a result, the sea surface temperature is higher than the land surface temperature in the morning.

Formation of the Breeze

The sea surface heats the air above the sea stronger than the land surface does with the air above land. The warmer air masses above the sea rise to higher altitudes yielding a low pressure region. As a result, the colder air masses from above the land 'travel' to the low pressure region above the sea. This 'traveling' of air masses is wind: wind, which blows from the land to the sea.

Here is a nice Figure from Wikimedia Commons describing the sea breeze (A, evening/afternoon) and the land breeze (B, morning). The Figure was provided by Jesús Gómez Fernández.

 

Shower Curtain Example

If you shower in a shower with a shower curtain, you might experience that the lower end of the curtain moves towards your legs. The physical processes are similar: The warm shower water heats the air within the shower. The warm air rises which causes a low pressure region at the bottom of the shower. The air is colder at the bottom of the room outside the shower which leads to a high pressure system. The air from the high pressure system (bottom outside the shower) 'tries' to flow towards the low pressure system (bottom inside the shower) which moves the bottom end of the curtain towards you.

This example works only if the room temperature in the bathroom outside the shower is not too warm/hot.