Wolverine does it before a lot of his action in the X-Men movies - but there was a sense that part of it was related to his super-healing powers (snapping stuff back into place and all)
Then, I saw Cyborg do it on the Cartoon Network Teen Titans anime (I think it was the one where he fought Atlas), and the bad guy did it on the Justice League (the one where Superman is lost in his fantasy of life on Krypton if it hadn’t blown up).
I don’t have other specific cites, and I seem to recall seeing this in the past, but now it seems commonplace. Don’t get me wrong, I crack my neck, too (although I am far from a warrior!), but when did this become the unwritten code for “yeah, I’m cool, I’m relaxed and I am ready to kick your ass”?