You do not need a visa for flying over a country. Even better, for connecting flights you can often even land at an airport and change the plane without a visa of the country the airport is in - although this does seem to depend on the airport and the terminals used by the flights in question and it's prudent to verify this with the carrier or the airport in advance on every flight. You obviously will need a visa for leaving the airport. See http://travel.stackexchange.com/questions/21431/do-u-s-citizens-need-a-russian-transit-visa?rq=1