||Light pollution is a worldwide phenomenon whose consequences for the natural environment and the human health are being intensively studied nowadays. Most published studies address issues related to light pollution inland. Coastal waters, however, are spaces of high environmental interest, due to their biodiversity richness and their economical significance. The elevated population density in coastal regions is accompanied by correspondingly large emissions of artificial light at night, whose role as an environmental stressor is increasingly being recognized. Characterizing the light pollution levels in coastal waters is a necessary step for protecting these areas. At the same time, the marine surface environment provides a stage free from obstacles for measuring the dependence of the skyglow on the distance to the light polluting sources, and validating (or rejecting) atmospheric light propagation models. In this work we present a proof-of-concept of a gimbal measurement system that can be used for zenithal skyglow measurements on board both small boats and large vessels under actual navigation conditions. We report the results obtained in the summer of 2016 along two measurement routes in the Mediterranean waters offshore Barcelona, travelling 9 and 31.7 km away from the coast. The atmospheric conditions in both routes were different from the ones assumed for the calculation of recently published models of the anthropogenic sky brightness. They were closer in the first route, whose results approach better the theoretical predictions. The results obtained in the second route, conducted under a clearer atmosphere, showed systematic differences that can be traced back to two expected phenomena, which are a consequence of the smaller aerosol content: the reduction of the anthropogenic sky glow at short distances from the sources, and the slower decay rate of brightness with distance, which gives rise to a relative excess of brightness at large distances from the coastline.