Hydropeaking may result in behavioral responses in riverine organisms that experience rapid flow fluctuations. In stream fish, the balance between energy spent on swimming and foraging vs. food intake affects fitness, a balance strongly influenced by flow conditions. This study investigates the effects of rapid flow fluctuations on the foraging success, group cohesion (nearest neighbor distance) and microhabitat segregation of Atlantic salmon (Salmo salar) and brown trout (Salmo trutta) parr (45-55 mm) in both sympatric and allopatric groups in a controlled laboratory stream environment. Our results indicate that fluctuating flow does not significantly influence the foraging success in either species, regardless of group composition (sympatry or allopatry). We found that group composition, rather than flow fluctuation, significantly influenced group cohesion. Salmon exhibited shorter nearest neighbor distances than trout did in allopatry, but not in sympatry. In terms of microhabitat selection, salmon consistently held position closer to the substrate than trout, regardless of group composition, suggesting selective segregation as the main mechanism driving microhabitat selection. Trout, on the other hand, held position higher above the substrate in allopatry but used a wider range of positions when in sympatry with salmon, highlighting interactive segregation as a possible mechanism driving microhabitat use, which underscores the importance of fish community in shaping patterns of habitat use. Our findings suggest that hydropeaking may not strongly impair the foraging ability and sociability of salmon and trout parr. Additionally, we shed light on the mechanisms influencing microhabitat selection of salmon and trout parr in rivers with a hydropeaking flow regime. One possible application of our results is as inputs for individual-based models currently being developed for understanding the effects of hydropeaking on stream salmonid populations.