Myself and some buddies did both of those parks last year as part of an 8 day road trip. We stayed at a Crowne Plaza in Greentree while in Pittsburgh. It was a very nice hotel and they do a free shuttle to and from PNC Park, which you are going to love. In Philly, we stayed at a Holiday Inn right across the parking lot from Citizens Bank Park. Also a nice hotel and with it being walking distance, it is very convenient. I would recommend both hotels to anyone. Make sure you hit Primanti Bros. for a sandwich in Pittsburgh and Gino's for a cheesesteak while in Philly. Have a great trip!!
The Holiday Inn permanently closed in Philadelphia to make way for a casino!
In Pittsburgh, they close down the Roberto Clemente bridge before and after games so you can walk across and right downtown to all of those hotels. I stayed at the Wyndham Grand Pittsburgh Downtown, it was nice. You can then walk to the other things downtown on your visit. Primanti Bros has a downtown location you can walk to as well.
I live near Philly so I never stay at a hotel.
In Pittsburgh - Hampton Inn & Suites Pittsburgh-Downtown - Walking Distance to the Ballpark.
In Philly - Holiday Inn Philadelphia Stadium. Right next to the ballpark.