We investigated the properties of boxy/peanut-shaped (B/PS) bulges in a sample of 71 galaxies from the Edge-on Galaxies in the Pan-STARRS Survey (EGIPS) and 20 simulated galaxies from Illustris TNG50 using multicomponent photometric decomposition. For each real and simulated galaxy, we obtained a suitable photometric model in which the B/PS bulge was represented by a dedicated 2D photometric function. For real galaxies, we found that more flattened X-structures are generally residing in larger B/PS bulges. When tested against the galaxy masses, we verified that both larger bulges and more flattened X-structures are typically found in more massive galaxies. Since large bars are also known to reside in more massive galaxies, we conclude that the flatness of X-structures in larger B/PS bulges has a physical origin, rather than being solely a result of projection effects due to differences in observed bar viewing angles. When comparing the properties of B/PS bulges between EGIPS galaxies and TNG50 galaxies, with bars rotated for different viewing angles, we found that B/PS bulges in TNG50 are considerably smaller and less luminous in terms of total intensity. This is consistent with previous studies of bar properties in TNG50, indicating the B/PS bulges in TNG50 differ from those in real galaxies, as do their parent bars.