Evan Engram might have trouble sleeping this weekend from the pain caused by foot surgery. But that’s nothing compared to how Engram will feel if he gets a message this offseason that his days with the Giants are numbered.

The Giants must decide between Dec. 30 and May 5 whether to exercise the fifth-year option for 2021 on his contract or allow him to become a free agent after next season.

“I wouldn’t rest for the rest of my career if I wasn’t able to be a part of something special here,” Engram told The Post. “We’ve had a lot of adversity, a lot of tough ones the last three years. I don’t imagine myself anywhere else, but you never know. I know better days are coming for myself and for this place.”

The past two years of Engram’s career read similarly: elite tight end in 19 games played, but soon-to-be 13 games missed due to a string of injuries — including the foot sprain that landed him on season-ending injured reserve and will require surgery Friday from renowned Dr. Robert Anderson in Green Bay, Wis.

Anderson initially consulted on the injury, and Engram, 25, felt optimistic about a two- to four-week diagnosis and rest to recover. He did not make a decision to play through a recommended surgery.

“All the pictures didn’t point to that at the beginning,” Engram said. “It was dependent on how I felt getting back. [Surgery] wasn’t on the table. But just to be safe future-wise, we’re going to do it.”

The recovery means Engram won’t practice again until after the Giants decide his future. Engram was drafted by Jerry Reese, who could be two GMs removed if the Giants move on from Dave Gettleman, with coach Pat Shurmur, after two disappointing seasons.

Just four Giants first-rounders since 2010 (Jason Pierre-Paul, Prince Amukamara, Justin Pugh and Odell Beckham Jr.) have had their fifth-year options picked up. None since Pierre-Paul in 2010 have made it more than five homegrown seasons.

The Giants are designed to have one of the best young offenses in the NFL — with Daniel Jones, Engram, Saquon Barkley, Sterling Shepard and Darius Slayton. But Engram’s name surfaced as a trade candidate both of the past two seasons and could again with the development of rookie Kaden Smith.

Engram, who is set to earn $1.9 million in 2020, would cost the Giants about $6 million in 2021 on his team option. The salary is determined by position and draft slot.

“He works extremely hard and you hate to see that, but he’s so mentally tough, he’s going to bounce back. It’s hard to deny a guy like that,” Shepard told The Post. “What we see at practice and in games is a special talent, a matchup nightmare. I want those days for him super bad, and I know he wants it.”

The worst-case scenario for Engram was a Lisfranc injury. Rehabbing and running on the injury did not worsen the injury but didn’t help, Engram said.

“It’s not a full Lisfranc injury, but the ligament is still not healed correctly,” he said. “There is still a little bit of space. To my knowledge, they are going to put joints back together and kind of stabilize the joints so the ligaments are not stretched. It just didn’t get better. … It was a tough injury, trickery injury.”

Engram could be held out of minicamp and OTAs but expects to be “more than ready for training camp” based on timetables he received. He finishes the season with 44 catches for 467 yards and three touchdowns.

“I’ve had my moment of being upset already and letting it all out, but I’m real strong in my faith,” Engram told The Post. “I have peace of mind knowing things are working for the future. I’ll get excited once the pain wears off from the surgery and I come out on the other side. It’s just a reset, and I’m completely motivated. I’m going to turn it into something special.”