Obviously, fish will do that when they are moribund - close to death. Possibly, something unusual during transport stressed it out, but more likely - the fish was weak at the dealers, and the "normal" stress of transport just pushed it over the edge. If you KNOW that you didn't do anything wrong during transport (like continually picking the bag up and looking at the fish while you are driving along in a convertible on a sunny day (photoshock) then that is probably what happened. However - sweetlips will swim on their sides during transport - MAYBE that was o.k., but the upsidedown symptom came later. One common issue is salinity shock - dealer's fish-only tanks are often at a low S.G. and then people buy those fish and acclimate them to normal reef salinity levels and the fish cannot adjust....
I see that this post is almost 24 hours old - so the fish is probably dead - sorry if that is the case.
Jay