Your system does not produce power throughout the night. However, net metering processes do work. Your system generates a lot of power during the day, typically more than you need. The additional electricity is returned to the grid and the meter runs backward. In the night, you receive the credit during the day and receive electricity from the grid.