My loaches love to lie about on their sides. First couple times it was a bit worrisome, but you get used to it. When I redecorated, using all driftwood, they stopped just laying about anywhere. Now they find little crevasses in the wood to wedge themselves into, or they just lay on their side under the wood. It is pretty common for me to see just the tail of a loach sticking out from under some driftwood.
Just one more of their loachy behaviors, it's what makes em' so interesting to have.