Power supply or processors overheating, one or the other. Perhaps even graphics card, but I would suspect the first two.
Check inside to make sure all fans are unobstructed and operating normally. Maybe even run it with the case open so you can narrow down where the smell is coming from.