One of two possibilities. They are scouts looking for food or you have a nest inside your laptop. A nest would see a trail of ants in and out of the machine every few days, as there are larvae, the queen and workers to be fed. If you transported your laptop with anest inside, particularly if it was turned from a horizontal position to a vertical and back to a horizontal, there would be an exodus of workers to defend the nest. I think it is safe to assume you have scouts.
Wherever your laptop resides when not in use is the point of entry of the ants. That room will no doubt have ants on the floor through some crack that leads to the outside. You can try placing a pinch of fine sugar near some scouts then check back in half an hour or so. There should be a steady line of ants carrying the booty back outside to the nest. once you ascertain where they are gaining access, you can put down a contact residual insecticide at and around the point of entry/exit. Being persistent little buggers, they will probably find another entry point, so you go through the procedure again, until you win.
Blue
PS I hate it most when it happens when you are lying in bed at the time. I can cope with them elsewhere.