she could ask to be moved to a different seat in class if they are assigned seats. or call and talk to the math teacher directly, im sure they would want to know what is happening in their class. i know your daughter doesn't want this but she shouldn't have to deal with them acting that way towards her also. it could, if it hasn't already start to affect her grade because of worrying about it happening, seeing it or her mind wondering about it instead of focusing on the lesson. hopefully the teacher will handle it properly and not bring up who tipped them off and watch for the behavior and catch them in the act. or have something between your daughter and the teacher to where if it happens she can give a sign so the teacher knows it just happened and can act as if they just seen it themselves. just so it doesn't look as if she is the one telling.
the boys need to know that it is a very serious act even though they see it as a prank. a friend of mine was in a bar with 21 and older adults and while the women were "flashing" he "flashed" his and someone called the police and reported it. he was charged with indecant exposer (spelt that wrong..) in a public place and now has to register as a non-violent sex offender because of this.
what they are doing is wrong any way you look at it and your daughter is a victim of it.
hopefully she can be strong enough to do the right thing for herself and maybe for someone who isn't as strong and doesn't have the support behind her like your daughter is lucky to have!