Production of gravitational waves in the early Universe is discussed in a cosmologically consistent analysis within a first-order phase transition involving a hidden sector feebly coupled with the visible sector. Each sector resides in its own heat bath leading to a potential dependent on two temperatures and on two fields: one a standard model Higgs field and the other a scalar arising from a hidden sector U(1) gauge theory. A synchronous evolution of the hidden and visible sector temperatures is carried out from the reheat temperature down to the electroweak scale. The hydrodynamics of two-field phase transitions, one for the visible and the other for the hidden is discussed, which leads to separate tunneling temperatures and different sound speeds for the two sectors. Gravitational waves emerging from the two sectors are computed and their imprint on the measured gravitational wave power spectrum vs frequency is analyzed in terms of bubble nucleation signature, i.e., detonation, deflagration, and hybrid. It is shown that the two-field model predicts gravitational waves accessible at several proposed gravitational wave detectors: LISA, DECIGO, BBO, and Taiji, and their discovery would probe specific regions of the hidden sector parameter space and may also shed light on the nature of bubble nucleation in the early Universe. The analysis presented here indicates that the cosmologically preferred models are those where the tunneling in the visible sector precedes the tunneling in the hidden sector and the sound speed cs lies below its maximum, i.e., cs2<13. It is of interest to investigate if these features are universal and applicable to a wider class of cosmologically consistent models. Published by the American Physical Society 2024