We do security training every two years. We learn some self defence and ways to deal with aggressive passengers. We are also trained how to put on the flexicuffs.
The captain has overall authority on when someone is to be restrained and must give approval, however if a situation is violent enough, you can attach the flexicuffs before letting the captain know. If there is time, the CSM would speak with the captain first advising of the situation.
Once the restraints are on, they stay on till landing.