City needed a 70th-minute strike from Yaya Toure to see off the dogged Potters at the Etihad Stadium and claim three crucial Barclays Premier League points.
The unconvincing win kept up the pressure on Chelsea and Arsenal at the top and lifted spirits after two league games without a win and the midweek Champions League loss to the Spanish champions.
It was also important to keep pace with the leaders now to avoid too much catching up in the weeks ahead.
With other competitions now taking centre stage, including next week's Capital One Cup final, City do not have another league game until March 15.
Nasri said: "It was frustrating. Playing against a team with 10 at the back is always difficult, especially when three days earlier we played against Barcelona.
"Everyone was not really fresh in the first half.
"We played better the last 10 minutes of the first half and at half-time the manager told us to get behind their midfield and to play as simple as possible to have a few more opportunities to shoot.
"That is what happened and the most important thing is the win - like Chelsea, who suffered against Everton and then scored in the last minute.
"It is difficult now not to play a league game for three weeks but we have other targets and are going to try to win every game.
"After, we will see. The good thing is we have some players coming back from injury and the team is going to be fresh again."
City took time to find their stride and Stoke had the better of the early stages. Joe Hart produced a fine low save to keep out a powerful drive from Charlie Adam, who struck a fine winner against Manchester United earlier this month.
The tide began to turn in City's favour just before the break as Edin Dzeko curled an effort narrowly wide and Fernandinho shot straight at Asmir Begovic.
Stevan Jovetic came off the bench to test Begovic in the second half but was soon forced off again with cramp.
The breakthrough finally came 20 minutes from time when Nasri and Aleksandar Kolarov combined to set up Toure in the box and they would have had another but for an extraordinary miss by Dzeko.
The Bosnian was picked out unmarked two yards from goal by Jesus Navas but fluffed his attempt to kick into an unguarded net. His embarrassment was obvious as he took out his frustration on the goalpost.
Former City midfielder Stephen Ireland had a late chance to equalise but Stoke were left to reflect on a result that leaves them in the thick of the bunch of sides just above the bottom three.
Begovic said: "It was a tough game. We stuck to the gameplan as good as we could.
"It is always difficult coming here against Man City and the quality they have.
"We were unfortunate we didn't get that bit of luck to get a result.
"But we stuck at it. The commitment and energy was great by the players.
"If we continue like that for the rest of the season I'm sure we'll be okay.
"It's very tight. A couple of results here and there can make a big difference.
"We will take heart from the performance, take the positives and move on to next week - Arsenal at home.
"That's going to be a tough game but we will hopefully pick up enough points to stay up and push up the table as well."
Begovic admitted his friend and international team-mate Dzeko let him off the hook with his miss from in front of goal.
Asked if he felt sorry for Dzeko, Begovic said: "No, I didn't. He did me a favour there!
"I know how much he wanted to score. Thankfully it didn't work out this time so I've got the bragging rights."