Another possiblility is that one of the cylinders in the engine is sealing on a compression stroke when you turn the engine off. These cold gasses get heated up by the engine and start to expand. This "locks" the engine. As soon as the engine cools down a little bit these gasses shrink, unlocking the engine. The solution is to get a new battery that can overcome the pressurized cylinder.