The relative yields of Υ mesons produced in pp and Pb-Pb collisions at √sNN=5.02 TeV and reconstructed via the dimuon decay channel are measured using data collected by the CMS experiment. Double ratios are formed by comparing the yields of the excited states, Υ(2S) and Υ(3S), to the ground state, Υ(1S), in both Pb-Pb and pp collisions at the same center-of-mass energy. The double ratios, [Υ(nS)/Υ(1S)]Pb−Pb/[Υ(nS)/Υ(1S)]pp, are measured to be 0.308±0.055(stat)±0.019(syst) for the Υ(2S) and less than 0.26 at 95% confidence level for the Υ(3S). No significant Υ(3S) signal is found in the Pb-Pb data. The double ratios are studied as a function of collision centrality, as well as Υ transverse momentum and rapidity. No significant dependencies are observed.