The global demand for sustainable energy sources drives interest in flow energy harvesting for renewable energy generation. Understanding the impact of boundary region size is crucial to create practical and autonomous devices. This study investigates how changing the distance between wall boundaries (y∗) affects the performance of a piezoelectric-based energy harvester that converts aeroelastic motion into electrical energy. The research focuses on the interaction of a piezoelectric flag with fluid flow downstream of inverted C-shaped and circular cylinders placed in a uniform fluid flow. The dynamic behavior of the piezoelectric flag is influenced by the gaps between the cylinders and the flag (Dx), as well as between the cylinders and the walls (Dy), leading to fluctuations in the levels of harvested power. The arrangement of cylinders with specific dimensions (2.0 ≤ Dx ≤ 3.0, Dy = 4.65) consistently demonstrates the highest power output through continuous flag motion. The inverted C-shaped cylinder outperforms the circular cylinder, showing a 19 % increase in power output. Particle Image Velocimetry (PIV) experiments confirm these findings by showing improved wake dynamics alignment and energy efficiency. However, certain gap sizes lead to lower energy production due to boundary effects and inadequate wake flow coupling. This research provides valuable insights into the optimal design configuration for piezoelectric-based energy harvesters in fluid flow environments.