I grabbed sched 80 heavy wall PVC conduit for my run to the shed, but later noticed the elbows are sched 40. Is it legal to use them together (mixed in the same conduit run) in the trench or anywhere else (eg thru the garage)
You can mix them, as long as the places where you have schedule 40 elbows are places where schedule 40 is permitted.
It never came up but I'd be surprised if you had any issues. You ought to make sure that the fittings match, for example if you use a coupling between the schedule 80 and the schedule 40 elbows, it must be rated for both types. Similarly, if you use the bell ends built into the conduit or elbows you would want to check with the manufacturer to make sure it's listed for mating with the other type.
Schedule 80 is for when the PVC conduit is going to be exposed to physical damage, i.e. on the OUTSIDE of a wall. Schedule 40 must be buried or inside of a wall, covered and protected from damage. If your elbows are all in the trenches, Sch. 40 is fine. If you are using a sweep elbow coming up out of the ground and into sch. 80 along the outside of the wall, that sch. 40 sweep ell is not correct.