• Cyclic sedimentation has varied at several timescales and this variability has been geologically well documented at Milankovitch timescales, controlled in part by climatically (insolation) driven sea-level changes. At the longer (tens of Myr) timescales connection between astronomical parameters and sedimentation via cyclic solar-system motions within the Milky Way has also been proposed, but this hypothesis remains controversial because of the lack of long geological records. The absence of a physical mechanism that could explain the connection between climate and astronomy at these longer timescales led to the explanation of plate motions as the main driver of climate on Earth. Here we statistically show a prominent and persistent ~36 Myr sedimentary cyclicity superimposed on two megacycles (~250 Myr) in a relatively well-constrained sea-level (SL) record of the past 542 Myr (Phanerozoic eon). Given the possible link between amplitudes of the ~36 and ~250 Myr cyclicities in SL record and the potential that these periodicities fall into the frequency band of solar system motions, we suggest an astronomical origin, and model these periodicities as originating from the path of the solar system in the Milky Way as vertical and radial periods that modulate the flux of cosmic rays on Earth. Our finding of the ~36 Myr SL cyclicity lends credibility to the existing hypothesis about the imprint of solar-system vertical period on the geological record. The ~250 Myr megacycles are tentatively attributed to a radial period. However, the tectonic drivers also remain potentially plausible. The potential existence of a correlation between the modeled astronomical signal and the geological record may offer an indirect proxy to understand the structure and history of the Milky Way by providing a 542 Myr long record of the path of the Sun in our Galaxy.