Poor ventilation could be one issue. So again, make sure that the PS4 is in a well-ventilated spot.
Software or firmware issues can cause the PS4 to lag, as well as a cluttered database, a clogged cache, a full hard drive, or slow internet.