I've never seen this phenomenon in a water heater, though it does happen once in a while. However, it is common in boiler systems. Older boiler systems had an expansion tank which was about half full of air, and you had to watch the glass guage on the end of the tank to see that the level of water in the tank remained at acceptable levels because the boiler would "make" air. Heating and reheating the water would release trapped air.
These days, it's not uncommon to use an expansion tank on a water heater, especially when there is a water pressure reducing valve on the incoming water. But this probably wouldn't solve your problem because these are the bladder-type tanks, and not designed to hold air in the water chamber. You might be able to add an air relief valve similar to those used on boilers, though it might take a little repiping on the hot water side of the heater to trap the air.
The vent would go in the hot water line, but the line should be horizontal, then drop down before going back up to the system, so that air in the line above the heater couldn't get into the rest of the system.
This assumes that it is indeed air and not steam, that your relief valve is functioning correctly, and so on. One assumes that the heater is separating air from water whenever it's heating, but it tends to build up during the night when the hot water isn't being used.
In a boiler, air is bad because it can lead to rusting and failure, and I don't know if it would be the same in a water heater, but I think the problem should be addressed, if only to prevent broken water glasses and heart attacks.