Someone else on this site wrote that she used to rub something across her upper lip as a self-soothing mechanism all the time when she was little, and that to this day when she wants to concentrate on a test or something like that, she will rub the end of a pen across her upper lip. It might be that kind of thing, a way to self-soothe. I would try not to make a big deal out of it, except maybe to find her a small fuzzy toy or one of those hankie-sized soft blankets, and let her use that, so she won't be tearing at cotton all the time. Good luck!
Children sometimes get in repetitive stages. She might grow out of it. If she doesn't then maybe u should call her pediatrician. Good luck.