I think you refer to the Muscle fatigue:
A state of exhaustion or loss of strength and/or muscle endurance following strenuous activity associated with the accumulation of lactic acid in muscles. (Source)
So yeah, you're right about the lactic acid overproduction :)
How Muscle Fatigue Works ?
During short term (anaerobic) exercise, ATP and creatine phosphate (CP) are used up within the first 7 seconds of training. This signals the metabolism of glycogen to produce energy for your body. This process is known as glycolysis.
During glycolysis, glycogen (muscle sugar) is broken down to produce more CP. The breakdown of CP releases energy, which catalyzes a reaction to produce ATP. The production of more ATP allows movement of the muscle to continue.
Lactic acid is a product of glycolysis created by the breaking down of pyruvate.
Lactic acid is then disassociated to produce lactate. When lactic acid (C3H6O3) releases a hydrogen ion (H+), the remaining compound binds to a sodium ion (Na+) or a potassium ion (K+) to form a salt. It is this salt that is lactate.
Now the cell contains a lactate compound and a free H+ for each compound of lactic acid that is produced. It is this increase in cellular H+ that causes the pH to decrease, becoming more acidic. The acid in the muscle causes the fibers' calcium-binding capacity to decrease, thus limiting muscle contraction. This is the cause of muscle fatigue.
So the muscle Fatigue occurs when the muscle experiences a reduction in its ability to produce force and accomplish the desired movement.
Short term fatigue (failure to lift a heavy weight, do more push-ups, etc.) is different than long term fatigue such as as a marathon run, a 100 mile bicycle ride, or a full-day hike through the Rocky Mountains of Colorado.
Muscles become fatigued during high intensity exercise, most notably that the demand for oxygen can be greater than the supply. The blood flow to the muscle can be reduced because of :
muscles intensely contracting can reduce blood flow and thus oxygen availability, or
the muscle is simply working so intensely that there literally is not enough oxygen to meet demand (a sprint at top speed).
The factors that explain fatigue are complex and after more than 100 years of investigation are still a topic of active research, you can check those articles for more informatoins :