That normal breeding behavior
The curling action the Betta is doing is normal breeding behavior. It looks pretty brutal but it is how it is done. The male must wrap it's body around the female to squeze the eggs out of the female. This is an exhausting process and often the female may "pass out". The aftermath of the birthing process does leave the fish pretty "beat up". Give some time and separate the female after a day should help. Just don't break any of the "bubble nest" in the process if possible. There are eggs in the bubbles. The male is left behind to take care of the nest and NOT the female! :cool:
Hopefully, everything will be okay. Separation after breeding is necessary or they will kill eachother.