Imho, it's wise to wait until the warranty is up before you do anything like that. Unless, of course, it was getting repaired for some reason.
Warranties are usually short anyway, at least the manufacturer warranty. I think those are around 1 or 2 yrs unless you added an extended warranty.
However, sometimes we decide we want a faster machine. Also, if you wanted to use virtualization, say, you couldn't because your laptop processor doesn't support it. You might then want to upgrade the processor to one that does.
The problem with upgrading processors in laptops is that they are much more difficult to deal with than desktops. In some laptops, you have to practically take it all apart to get at the cpu. Some processors are soldered to the motherboard although many have sockets. It depends on how the laptop is designed and whether you want to do it yourself. Laptop parts are fragile and I think it's easy break some of the tiny internal components when taking things apart.
It is probably best to consider upgrading if you really want to and are willing to take the risk. If you get someone else to do it, prepare for an added cost, the labor plus the processor.