There's a high chance you might have overcooked your egg mixture on the stovetop. If the mixture is cooked for too long or at too high a temperature, it can start to break and become lumpy. If that happens, immediately remove it from the heat. Then use an immersion blender to blend it smooth again. Just don't transfer it to a high-powered blender as that'll incorporate too much air and make the custard whipped and frothy.