In-situ observations indicate variations in stratified conditions over the coastal valley off the Sansha Bay in the northwestern Taiwan Strait across different years. However, dynamic processes and mechanisms governing the upwelling process over the valley, as influenced by stratification, are still unknown. By employing idealized numerical simulations, we demonstrate that compared to the unstratified case, the surface offshore flow intensifies, upwelling flux and net cross-shore transport are enhanced, upwelling area expands, and the cross-shore velocity structure is modified over the valley under stratified conditions. The primary factor controlling the vertical velocity within the valley is the relative vorticity change along a streamline (RVC). Further decomposition of the RVC reveals that the depth-averaged alongshore velocity (