Power is a difficult concept to measure. One approach, taken by the Correlates of War Project, has been to measure material capabilities instead. The Composite Indicator of National Capabilities, for example, aggregates two demographic capability indicators (population and urban population), two economic capability indicators (iron and steel production and energy consumption), and two military capability measures (number of armed personnel and military spending).
By this measure, originally released by Singer, Bremer and Stuckey (1972) and updated by Singer in 1987, the Ottoman Empire hovered around 2% of global material capabilities in the 1880s and 1890s, while Japan slightly increased from about 2% to about 3% over the same period, permanently passing the Ottoman Empire.
Of course, another measure of power is the ability to win wars, and Japan seemed to be better at this than the Ottoman Empire, which was rife with internal rebellions (see Dixon and Sarkees 2016 for a list of rebellions in each between 1816-1918 for the Ottomans and 1860-2015 for Japan). So even the qualitative historical evidence suggests a rising Japan surpassed a declining Ottoman Empire sometime in the late 19th century.
SOURCES
Dixon, Jeffrey S., and Meredith Reid Sarkees. (2016). Guide to Intra-State Wars. CQ Press (SAGE).
Singer, J. David, Stuart Bremer, and John Stuckey. (1972). "Capability Distribution, Uncertainty, and Major Power War, 1820-1965." in Bruce Russett (ed) Peace, War, and Numbers, Beverly Hills: Sage, 19-48.
Singer, J. David. 1987. "Reconstructing the Correlates of War Dataset on Material Capabilities of States, 1816-1985" International Interactions, 14: 115-32
The Ottoman Empire arguably was on the down slope as early as the 1820's (Greek Uprising in '21, Russo-Turkish War where the Russians actually managed to beat the Turks!) and they were known as the "sick man of Europe" by 1853 (so-called by Nicholas I of Russia). Crimean War happens, the Allies win, but it was evident that the Ottomans were on the decline. France's continental star rose, Napoleon happened, and at places like Borodino - a battle that presaged how things would go for the Germans in WWII - the Russians looked fairly competent as they broke the Grande Armée and eventually marched on Paris.
After that, the real race was between Russia who, it could be argued, peaked in the mid 1800's before Nicholas I screwed things up, and Japan, who was rapidly modernizing throughout the Meiji era. Conclusive proof of the shift from Russia as the "gendarme of Europe" to being eclipsed by Japan happened in 1905 at the Battle of Tsushima, which saw the Japanese fleet kick the shit out of an overextended Russian armada. After that, you have a series of political revolutions in Russia leading to, well, the USSR, while Japan's star continued to rise through about, oh, 1943.