Back when I was in the military I had a few different hair lengths, and of course, had to meet very strict uniform requirements- especially when in Iraq and doing convoys.
The easiest way is to learn to french braid and do two braids down your scalp- spaced evenly and slightly to the sides running towards the nape of your neck.
Doing the tight bun towards the nape of your neck and wrapping the hair around it does work, but it really is easier to braid it and wrap it around the bun to keep strands from falling out.
If your hair is super long, just pull strands of it back through your braids to layer it, kind of in a way making padding around your head with your hair.
Have you thought about cutting out a little of your helmets padding to make like a fitting area to help hold your hair?
I dnt have hair problems anymore. Iraq helped me decide to shave my head. And yes, Im a girl.