During the second cell fate in mouse embryos, the inner cell mass (ICM) segregates into the spatially distinct epiblast (EPI) and primitive endoderm (PrE) layers. The mechanism driving this pattern formation, however, remains unresolved. Here, we report that, concomitant with the segregation process of EPI/PrE precursors starting from mid-blastocyst, the blastocyst cavity begins to oscillate cyclically with rapid contraction yet slow expansion, triggering a phase transition in the ICM to a fluid-like state. This asymmetric oscillation of the blastocyst cavity facilitates EPI/PrE segregation by enhancing cell-cell contact fluctuations within the ICM and initiating convergent cell flows, which induce movement of these two cell types in opposite directions, wherein PrE precursors move toward the ICM-lumen interface, whereas EPI precursors move toward the trophectoderm. Last, we found that both PDGFRα expression and YAP nuclear accumulation in PrE precursors increase in response to blastocyst cavity oscillation. This study reveals the foundational role of physical oscillation in driving embryonic pattern formation during early mammalian embryonic development.