Have you ever gotten caught up in so much pressure and felt like you needed to escape, to just go to another place for a little bit? If you have had this thought drugs could've possibly come into your mind as a solution. Even though they aren't a good choice many people fall into the trap of the addiction to drugs. Although when you take drugs you get a little chance to forget your problems, but once you come back to reality the pain is much greater and people want the happy place they go to back, which is part of why drugs become so addictive.
Pi's behavior is showing that he really isn't enjoying life right now and he feels it getting worse and worse for him, so he just wants to go into a different state of mind, leave the boat for a little bit, just forget about his problems. The trance he puts himself in when he uses the wet rag to put over his eyes gives him a way to do that and he goes to a place in his mind where all of his problems just go away. This is like a drug to him. It takes away his problems for a little bit, but the pain of having them back, thrown in your face once again, when you come back to reality creates great pain.
with pain comes equal pleasure. Therefore using drugs is not worth it, because in the end the pain will make up for the pleasure you got leaving no point in doing it in the first place. Pi's behavior is showing that he is starting to give up and loose hope. He tries to just forget about his problems and go to another place by using his trance. That is giving him the same effect that drugs would be and he would probably just be better off without it.