well, if you cut a cup in half and put it in cut side down, it should just float, this is commonly used for bubblenesters in spawning. in any case, i didn't present this as a permanent fix, it only seemed to distract him for a while. i think pacing in fish probably is similar to pacing in other animals and has something to do with having too little room to work off energy, a lack of stimulation, or something making it anxious (such as being new). This stopped my fish for a while, but not long after i moved him to a tank that was very heavily planted (in which he hid constantly), then moved him again to a larger tank that isn't as heavily planted, but seems to give him room to swim and work off energy, enough places to hide, and enough variation in things to look at and places to search for food.
In my (meager) experience I have found that gouramis can be very retiring so beyond a place to build a nest, he may need a densely planted area in the tank to get away from it all. If your fish is pacing the tank, try offering him some changes in the environment, such as caves, plants, walls to swim through and around.