A goldfish will due this as a result of either an internal bacterial infection or an infestation of parasites. Raise the tanks salt concentration to 0.3% to help kill off any possible parasites. Also, Start the fish on an antibiotic medicated food. If the fish does not show any sign(s) of improvement continue treatment, only add an anti-parasitic medication to the tank's water.
Usually at the bottom of the tank in the rocks.
That means your fish is ill
If your seahorse is lying on the bottom of the tank, it's probably dead. They normally remain upright even when asleep.
If baby guppies are lying at the bottom of the tank they are dead. They tend to stay as hidden as possible in plants as the adults will eat them.
because it cannot get out to lay them in the corner
No it can't and won't hurt anything, It will just lay on the bottom of the tank.
Until you remove it...it's most likely dead.
because the fish may be sick and does not have the sternth to swim.
it means they are most likely dead or going to die
The sugar would lay on the bottom of the tank so the only way to know would be to remove the tank and remove the sending unit to gain access to the inside of the tank.
Siamese fighting fish lay on the bottom of the tank because they try to play dead
usually its cos there scared from traveling or there getting used to there new tank.