J.T. Miller #10 of the New York Rangers skates against Andrew MacDonald #47 of the Philadelphia Flyers in Game Five of the first round of the 2014 Stanley Cup Playoffs April 27, 2014. Photo: Getty Images

J.T. Miller knew it was a possibility on Saturday, which made for a fitful night’s sleep. But it wasn’t until 9:30 Sunday morning that Miller knew it was official.

When Miller arrived at the Rangers locker room at the Garden and saw his name and number on the board, he knew he was going to experience playoff hockey for the first time in his NHL career.

“I didn’t know until I got to the rink,” the Rangers’ 21-year-old rookie winger said. “I was not as much nervous as anxious, but the heart rate was up and I was just trying to calm myself down at the beginning of the game.”

Miller calmed his nerves by creating the Rangers’ first scoring chance with a tricky shot on Flyers goalie Steve Mason just three minutes into the Blueshirts’ 4-2 win in Game 5, a victory that gave them a 3-2 series lead. Mason made the save on that shot, but a tone was set — for Miller and the Rangers.

The kid said he truly felt as if he belonged when he assisted on Brad Richards’ goal at 8:07 of the second period, a goal that gave the Rangers a 2-0 lead.

JT Miller was drafted to the New York Rangers in 2011.Photo: AP

By the time the afternoon was complete, Miller, playing on the Richards line along with Carl Hagelin, logged 10:22 in ice time, had the assist and was a team-high plus-2. He made Rangers coach Alain Vigneault look like a genius maneuvering the lineup by sitting Daniel Carcillo in favor of Miller.

The faith Vigneault showed in Miller isn’t something the rookie took lightly, because it was faith he was not sure would ever come his way again after the Rangers coach not only sent him back to the minors in early April, but also publicly ripped him as he headed back to Hartford.

When Vigneault demoted Miller to the AHL’s Wolf Pack for the sixth time this season, he said: “He just hasn’t earned the right to be at this level on a regular basis. He needs to show more commitment on the ice and off. Until he does that, he hasn’t earned the right. J.T. has to figure it out and hopefully he will. When he does, we’re going to have a good player. If he doesn’t, he will be a good minor league player.”

Ouch.

Miller, the Blueshirts’ first-round draft pick (15th overall) in the 2011 Entry Draft who had 42 points in 41 games with Hartford this season, paid Vigneault back handsomely Sunday and figures to be back in the lineup for Game 6 Tuesday night in Philadelphia.

Matt Read #24 of the Philadelphia Flyers skates with the puck against Mats Zuccarello #36 of the New York Rangers in Game Five of the first round of the 2014 Stanley Cup Playoffs.Photo: Getty Images

“He brought us a good skill level,” Vigneault said. “I was thinking he might be able to help us out and he did a good job.”

Richards said he spoke with Miller before the game in an effort to calm him and keep him focused for his big moment.

“Especially being on my line, I’ve got to really try to hone him in and get him ready,” Richards said. “Obviously, it’s a big day for him and he’s learned a lot. He had some ups and down this year, a lot of lessons, starting in training camp. He’s resilient and hopefully he can build on this.

“He’s fearless. He’s not scared to make a play. He has that type of mentality. You could kind of predict it wasn’t going to overwhelm him because he has that type of character. It was a good first game in the playoffs for him to jump in. He played big minutes and played an important role.”