Personally I'd (initially) try taking the top off the reservoir in the lever (while it is level!) and pumping the brakes slowly, topping up the reservoir if necessary, then pumping some more while tapping the brake itself then tapping the hose from the brake to the lever.
If you top up he fluid in the reservoir too much while the pads are worn you will need to take the reservoir cover off and surround it with tissue paper when you want to push back the pistons when you replace the pads!
Cover the rotors! You don't want any brake fluid on them (it is not actually as fatal to the rotor as many insist, but it is annoying.)
If this fixes it but a short while later you have issues again then you probably have a leak somewhere.
If you do actually have a leak then it may be at the brake itself given the way you used to get braking power a while into the ride, it could just be the rotors/pads getting a little hydraulic fluid on them from a very slow leak between rides and not air as you thought (though equally it may have been air) you could check this by holding your brakes and pedalling somewhere safe and seeing if power begins to return as you burn off whatever is on the brakes (this can take a while with hydraulic fluid.)
When I contaminate my rotors and/or pads I tend to dump a bit of crud into the brakes and smudge it on to the rotors on purpose, before pedalling with brakes on somewhere safe, unlike iso, the crud option is always in plentiful supply out on the trail :) (Mid ride beer & burger stops are the cause of most of my rotor contamination issues...)
If you have leaks at the pistons themselves I would agree with Jackson and second his recommendation of replacing the brakes with cheap but solid and reliable Shimano Deore.