Totally stole this idea from a manufacturer but I thought it was brilliant, so I cooked up one of my own and documented the process as I made it, just for yall. I find I never get around to writing instructables unless I do it in the moment anyway.
As but a casual airgun shooter I feel obligated to note that I am far from any type of expert on shooting. If I make any incorrect assumptions here I'd appreciate any (polite) corrections.
Step 1: Cut and Measure, Long and Wide As Possible!
DO NOT just hack off the butt of the pants because they've got pockets on them. The pocket panel is very easy to remove and it's on the widest part of the pants. Remove this, and you both dramatically shorten your fabric and the size of your sandbag, because the maximum height of the bag is dictated by its length!
My strips worked out to 8.75 inches wide and as long as the legs would allow me with this width, about 36 inches, before any sewing at all took place. You can always add more in either direction really, just keep in mind how it might affect the structure of the bag or how a gun sits on it. Keep your cuts clean and straight the whole way down, or it'll be a pain to work with later on when you're closing it up, and the bag will fold up all lopsided. A rotary cutter and see-through sewing ruler are your best friends here.
Step 2: Hem One Edge, Close Up the Other Three
Now lay it out with the back of the denim facing out and sew the other three edges on each strip to the matching edge on the other strip, like a pillow case but with the side open instead of the end.
Step 3: Do a Bit of Math to Size the Compartments
After hemming and sewing the edges in the last step, my now one-piece bag is 92cm by 22cm. Let's say I want five to seven compartments. Divide your bag length by the appropriate number and take a look at your bag with your measuring tool to see if it fits your liking. More compartments = more fine-grained height adjustment when rolled or unrolled, but less sand in each compartment also means you won't have much leeway when adjusting the old fashioned way, either.
An easy way to do a rough check is by making a series of small folds and folding the bag over itself completely, each fold accounting for an individual compartment. Unfold it and check the folding marks. Give it a few tries to see how you'd like it.
This part is really all to taste. Go nuts. If you don't like it, you can always rip out your stitches and plastic bags and try another configuration.
I'm going with seven 13cm wide compartments, and pinned the sides together appropriately.
Step 4: Making and Filling Plastic Bags
Garbage bag, bulk plastic sheeting, whatever you've got on you. Doesn't need to be very tough, because that's the denim's job. This part really took doing it for real to find out exactly what I needed to do. My math was way off, I thought I would need shorter bags than the bag strip is wide, in order to nearly fit in the compartments while I sewed them, but it really isn't necessary, and just stuffing them deep in the slots while I sewed it up was easy.
TLDR; just make them the same width as your strip.
If you've got a small scale, you're in luck. I ended up putting about 1lb 14oz of playground sand I had laying around in each bag. Throw some in, seal it up, and put the bag in the slot. Flatten it out so it's roughly the size it'll be in practice, measure the height and multiply by the number of bags in your strip. Aim higher than your usual gun mounting point, so you'll have some extra, and to account for any slack that might result in a smaller bag strip than expected.
Step 5: Sew It Up!
Right after finishing this I realized I probably should have just lowered the feed dogs and put it through entirely manually, but maybe that's incorrect, as this is actually the first time I've thought of a good reason to disengage them.
The corners will give you a real hard time unless you did a real clean job setting them up before, so just do them by hand afterwards.
That's it, ya done, son! Roll it up and make sure it stacks high enough, try putting it in some different shapes, keep it as your lone, inanimate companion when you're shipwrecked on a deserted island, the world is your oyster.