i have had that happened to a bichir that i had for couple years and it developed this condition out of the blue, so it definitely wasn't because it was still adjusting or something. and the problem was that the bichir couldn't sink to the bottom, so it wasn't floating out of choice.
anyway, i never quite figured out the cause. it could be trapped gas, or swim bladder problem? or whatever else. i tried meds, but it didn't help and the bichir didn't make it. sometimes if you're lucky, it'll go back to normal after a short while on its own (eg if it somehow manages to release the trapped gas). and just as often the bichir won't make it. and i'm sorry to say but its not clear to me what can be done to maximize the chances that it'll recover. you can try medicating it as if it's an internal bacterial infection, but even so i think it's still a wait and see kinda thing. good luck!