Why do I suddenly have drain flies?
Drain flies appear when there is a damp breeding site with a build-up of organic material. Their larvae feed in the slime inside drains and traps, but they can also develop around sewage leaks, dirty bins or other wet debris. Seeing adults near a basin does not identify the exact breeding site. (University of Maryland Extension: Drain flies)
Check the drain and nearby damp areas for accumulated material or plumbing problems. Removing adult flies alone leaves larvae and their food source behind, so new flies can keep emerging. Cleaning the breeding material and correcting persistent wet conditions addresses the cause; recurring activity may need a closer plumbing inspection. (University of Maryland Extension: Drain flies)