Yes, you can certainly suddenly develop an allergy to a food (or other substance) with which you have had no previous problem.
Pain in the stomach after eating eggs is most likely the result of an egg allergy and will often be accompanied by other symptoms such as skin rashes, nasal congestion, or asthma (wheezing, shortness of breath, coughing). Hives (extremely itchy welts on the skin) are especially common.
My immediate concern for you, and what I emphasize in my response here, is that an egg allergy can cause anaphylaxis (a severe and serious allergic reaction which is rapid in onset and may cause death). If you experience lightheadedness, difficulty breathing, or if your throat begins to swell, CALL 911 (in U.S.; if you are outside of U.S. then call IMMEDIATELY for an emergency ambulance), as these symptoms can progress to LIFE-THREATENING within a matter of seconds or within just a few minutes!!!
I hope that this info has been helpful to you. I do not wish to alarm you, but you MUST take this matter most seriously!!!
Wishing you well,
Dianne (a longtime and very seasoned Critical Care registered nurse)