If she doesn't do it at school then I would think something in her home life is upsetting her, you say she is with you most of the time it could be she needs to be with her mom more , ask mom to make sure she plays with her and gives her attention she needs . How does she get on with her older brother ?
i mean my niece lives next door with my sister her older brother and my parents she doesnt do it school it mostly happens at home. i try not to assume its happening at home but she is here most of the time and things are i guess normal i mean her mother works more but that should be a difference for my niece. its been the same for almost a year nothing much change except that a large family moved across the street and she plays with them in our yard supervised. shes not allowed to go over there since they have an older child wit friends. i honestly dont know what could of abruptly brought this on
Could she be upset about anything is all well at home, does she do this when she is at home and also at school?
Well you should probably get her tested for celiac disease, IBS, chrons, and colitis. It also could be that dairy is giving her problems.