Cook, 25, claimed 51 wickets at an average of just 16.23 in last year's County Championship, and now boasts an overall first-class record of 213 wickets at 19.37, making him the first player to reach the 200-wickets milestone while averaging less than 20 since Derbyshire's Alan Ward in 1971.
He has been named in both the red- and white-ball squads for the forthcoming England Lions tour of Sri Lanka.
Cook said: "It's been an exciting year for me personally and I'm already looking forward to seeing what the next three years have in store for me and my career at the club I've supported all of my life.
"I'm happy with the progress I've made this season with the help of Anthony McGrath and Mick Lewis, and I feel my white-ball game in particular is going from strength to strength. I've had the opportunity to test my skills in the Vitality Blast and The Hundred this year, which was especially rewarding.
"I am always seeking ways to improve and look forward to heading overseas with England Lions before the season gets underway in April."
Head Coach, Anthony McGrath, added: "Sam has developed into one of the best bowlers in the county game and his great attitude and willingness to learn means that he will only keep on improving.
"He's enjoyed another fantastic year and I'm sure it's only a matter of time before he will get an opportunity to showcase his skills at international level.