Each cavity keeps pace with the related expanding viscera and is completely lined with a serous membrane that is given different names in each cavity (peritoneal cavity → peritoneum; pericardial cavity → serous pericardium; pleural cavity → pleura). The part of the serous membrane that covers the inner surface of the wall is called the parietal layer; the part that covers the surface of the organ is called the visceral layer. The visceral layer is also called the serosa on the abdominal organs. On the heart it is included in the epicardium.
The serous membrane produces serous fluid that completely fills each cavity. This fluid serves as a lubricant that allows for easy movement between various viscera or between viscera and the wall that encloses them.
Source: Atlas of Human Embryos.