I see this every year when the weather starts warming up. It’s usually seasonal insects that get attracted to light and water overnight, then end up stuck on the surface by morning. If your water chemistry is fine and the pool is clear, it’s rarely a sign that something is wrong.
One thing that made a noticeable difference for me was surface movement. When the pump shuts off at night and the water goes still, bugs can land and just sit there until morning. When I angled one of my return jets slightly upward to keep a little ripple on the surface, more of them ended up drifting into the skimmer instead of just floating around.
Lighting definitely plays a role too. Patio or landscape lights close to the pool tend to draw them in after dark. I switched one of mine to a warmer bulb and it reduced the swarm quite a bit.
You might also notice it happens more when nearby plants are flowering or after yard work stirs things up. Usually it’s just a short seasonal cycle and the skimmer takes care of most of it once circulation starts during the day.