Encapsulation configuration for electronic components in a flexible implantable medical device, including a first encapsulation section and a second encapsulation section, the first encapsulation section including a plurality of circuit boards (CBs), each CB including at least one electronics component and a plurality of connection cables, wherein each CB has a generally circular shape and wherein each connection cable electrically couples adjacent ones of the plurality of CBs alternatively at opposite ends, thereby giving the encapsulation configuration an accordion like shape when folded, the second encapsulation section including a flat CB, including a plurality of electronics components, wherein the flat CB has a generally rectangular shape, wherein the plurality of electronics components are positioned on both sides of the flat CB with taller ones of the plurality of electronics components positioned closer to the center of the flat CB and shorter ones of the plurality of electronics components positioned closer to the edges of the flat CB, thereby achieving optimal volume consumption in the flat CB, wherein the first encapsulation section is coupled with the second encapsulation section with a flat connection cable, and wherein the encapsulation configuration has a cylindrical shape.