BERLIN—German companies are quietly boosting investments in Russia even as Western leaders are warning Moscow about possible new sanctions for its actions in Syria.

In the past two years, plunging oil prices and U.S. and European Union sanctions on Russia for its intervention in Ukraine sent foreign investors fleeing. Now, Western firms are placing new bets that Russia, which has been battered by economic turmoil, is on the verge of an upswing.

German...