Q. Can one use the gym and a trainer before shacharis ?
A. Aley Siach (p. 64) writes that Rav Chaim Kanievsky shlita answered to a similar question, that it is not correct to do so. Yosef Daas (p.157) mentions different opinions.
Tefila Kehilchosa (p. 114, 23) rules in the name of Rav P. Sheinberg ztl, that if the intention of the individual is to be healthy and strong to be able to serve Hashem better and not for his own benefit and pleasure, it would be considered an act of Heavenly need and is permitted if it cannot be done at another time. They warn that one should make sure not to miss Tefila Betzibur and the correct time of reading the Shema and Tefilah.
Hatefilah Vehilchoseha (4: 10) also quotes Divrei Chachamim (1: 2) in the name of Rav Eliyashuv ztl, that it is permitted since it considered an activity of partial mitzvah. Piskey Teshuvos (89: ) quotes also similar opinions.
Horav Shlomo Miller's Shlit”a opinion follows Horav Chaim Kanievsky Shlit'a only lechatchila.
Rabbi A. Bartfeld as revised by Horav Shlomo Miller Shlit”a