According to the U.S. Department of Agriculture, cooked food items like pizza should be consumed within 2 hours. After this time frame, pizza will start getting prone to chemicals, bacteria, and fungi.