The car's Engine Control Module is sensing a drop in system voltage triggering the warning light. Year/make/model and age of the battery would be helpful, however there are a large number of variables here. Having just replaced the alternator, the wiring has all been disturbed by being disconnected and reconnected. Ordinarily this is not a big deal, but if your car is an older model and deterioration of the insulation/conductors in the wiring has set in, a change such as this could have made a wire connection intermittent. Also the battery terminals should be cleaned up when the wiring is inspected. Another possibility is the new alternator itself; if it was a remanufactured unit, these are known to sometimes have quality issues. If the condition persists it may need to be removed from the vehicle and tested.
Another possibility: if this is happening more in the daytime than at night, the air conditioning compressor clutch has a significant draw, and it cycles on and off. If you're running the A/C when the light comes on, try turning it off and see what happens. It could be that the new alternator or the wiring is marginal and when put under that load the system voltage gets pulled down.
Good luck with the troubleshooting. Developing the best explanation for what and when the problem is happening with the car will help your mechanic diagnose the issue.