Why do my CFL bulbs turn off after a while?
They're not going in the socket all the way

Because the wide base of the CFL is impacting the structure of the fixture. 

It's very common for fixtures to be built with the socket recessed in a way that presumes the long neck of an incandescent bulb, particularly with PAR bulbs.  On a CFL, they necessarily had that wide wedge-shaped base just above the socket (because the rest of the space must be fluorescent tube; fluorescent tubes take a LOT of space for the light they make). 

LEDs have a great deal more flexibility about component placement, because the actual light emitter is the size of your fingernail.  So you should be able to find LEDs with long necks (as the market anticipates this very problem; they just couldn't do anything about it with CFL). 

It's also possible they're just old

Believe it or not, there was a time when light emitters actually wore out.  That's the whole point of light bulb sockets.  It's not uncommon for a bunch of things, all of the same design, production and batch, used in the same conditions same number of hours, to start popping off at (very coarsely) about the same time.  

Obviously you wouldn't replace them with CFLs today, but LED would be the way to go.  Failure rules are a little different for LED; the emitters will outlive all of us, but many builders chintz out on the electronic driver, and that fails.