Trescothick made 153 and Abell hit 131 - his maiden first-class hundred - as they put on 272 for the first wicket.
Cooper struck 118 at number three and James Hildreth made 71 as the hosts built a huge first innings lead of 329.
Somerset, who led eighth-placed Hampshire by five points at the start of play, have eight bonus points.
Hampshire on the other hand have only taken one batting and one bowling bonus point from the game.
Resuming on 147-0, Trescothick and Abell took the hosts past Hampshire's first innings total of 240 before Abell was trapped lbw by Gareth Berg.
Skipper Trescothick, who signed a new one-year deal with the county on Wednesday, struck 29 fours in his 261-ball innings which came to an end when he was bowled by West Indies paceman Fidel Edwards.
Cooper then continued the fine work of the openers in glorious batting conditions as he brought up his first century for Somerset off just 103 deliveries and put on 142 with Hildreth.
Hildreth passed 1,200 Championship runs for the season before he was bowled by Liam Dawson (3-130) shortly before the close on a day in which 422 runs were scored.
Marcus Trescothick, Tom Abell and Tom Cooper all hit centuries as Somerset piled up 569-5 on day two against relegation rivals Hampshire at Taunton.