I have recently joined a Minecraft server (it allows AFKing and has no timeout) and set up a bunch of AFK farms, and I want to AFK while I sleep. But my laptops fan (it’s clean, I checked) keeps me up at night. Is there a way to AFK all night with my PC on sleep mode (i tried but it said “timed out” when I turned it back on).
Sleep mode on a PC works by freezing all processor activity. All running programs are effectively stopped, but with their state still stored in memory so they can be resumed quickly. Unfortunately, this means you probably can't do what you are hoping to do. From the Minecraft server's point of view, your PC in sleep mode is indistinguishable from it being switched off.
If you are still determined to AFK while you sleep, your options are limited to trying to reduce or block the fan noise in some way: maybe put the computer in a different room at night, or install a quieter fan, or wear earplugs while you sleep, etc.