Six of the seven goals were scored in a frenetic opening 41 minutes on the Spanish coast, but it was the Cherries who edged things through Cook's 85th-minute strike.
Bournemouth have now won one and drawn one during their pre-season tour of Spain, having also played out a 1-1 draw with Sevilla last weekend, although they so nearly threw away victory in this one after leading by two goals early on.
Fraser was heavily involved in the second goal, too, this time finding Jermain Defoe in the middle with a fine cross, allowing the English striker to flick home with the outside of his boot.
A second of the night soon arrived from Marti, converting from a clever Ruben Rochina through-ball, but Bournemouth were back on level terms prior to the break thanks to a towering Jack Simpson header.
Bournemouth made mass changes at the break and that appeared to impact on the game, with chances proving to be far more limited in the second half.
Marc Pugh forced a smart save out of the opposition keeper 15 minutes from time in the next meaningful effort, and then came the late twist as Levante half-cleared the ball and Cook blasted into the bottom corner from 25 yards.
LEVANTE: Oier, Tono, Chema, Roger, Bardhi, Postigo, Rochina, Verza, Pedro Lopez, Boateng, Jason
BOURNEMOUTH FIRST-HALF XI: Boruc, Francis, S.Cook, Simpson, Daniels, Mahoney, Arter, Hyndman, Fraser, Mousset, Defoe
BOURNEMOUTH SECOND-HALF XI: Begovic, A.Smith, Gosling, Ake, B.Smith, Ibe, Cook, Surman, Pugh, Brooks, King