The origin of the different spectral components present in the high-energy ( UV to X-rays/gamma-rays ) spectra of Seyfert galaxies is still being debated a lot . One of the major limitations , in this respect , is the lack of really simultaneous broad-band observations that allow us to disentangle the behavior of each component and to better constrain their interconnections . The simultaneous UV to X-rays/gamma rays data obtained during the multiwavelength campaign on the bright Seyfert 1 Mrk 509 are used in this paper and tested against physically motivated broad band models . Mrk 509 was observed by XMM-Newton and INTEGRAL in October/November 2009 , with one observation every four days for a total of ten observations . Each observation has been fitted with a realistic thermal Comptonization model for the continuum emission . Prompted by the correlation between the UV and soft X-ray flux , we used a thermal Comptonization component for the soft X-ray excess . We also included a warm absorber and a reflection component , as required by the precise studies previously done by our consortium . The UV to X-ray/gamma-ray emission of Mrk 509 can be well fitted by these components . The presence of a relatively hard high-energy spectrum points to the existence of a hot ( kT \sim 100 keV ) , optically-thin ( \tau \sim 0.5 ) corona producing the primary continuum . In contrast , the soft X-ray component requires a warm ( kT \sim 1 keV ) , optically-thick ( \tau \sim 10-20 ) plasma . Estimates of the amplification ratio for this warm plasma support a configuration relatively close to the “ theoretical ” configuration of a slab corona above a passive disk . An interesting consequence is the weak luminosity-dependence of its emission , which is a possible explanation of the roughly constant spectral shape of the soft X-ray excess seen in AGNs . The temperature ( \sim 3 eV ) and flux of the soft-photon field entering and cooling the warm plasma suggests that it covers the accretion disk down to a transition radius R _ { tr } of 10-20 R _ { g } . This plasma could be the warm upper layer of the accretion disk . In contrast , the hot corona has a more photon-starved geometry . The high temperature ( \sim 100 eV ) of the soft-photon field entering and cooling it favors a localization of the hot corona in the inner flow . This soft-photon field could be part of the comptonized emission produced by the warm plasma . In this framework , the change in the geometry ( i.e . R _ { tr } ) could explain most of the observed flux and spectral variability .