I had two African Dwarf frogs, and four neon tetras which are extremely calm fish. Then around 9:30 at night, one of my frogs just started banging his head against the side of the fish tank. My fish weren't bothering him, and the frog was on the opposite side of the fish tank. I was watching them for awhile, and out of nowhere he started doing that. He did die, but I am wondering why he would have done that, if nothing was even bothering him. I bought another one the next day, and he is doing very well.
I have several (4) and I often see them sort of obliviously swimming into the wall or objects or each other. It does not appear to be with aggressive intent but they make quick snappy movements and don't necessarily account for bumping things.
Pretty much any time they need air they shoot up almost as fast as they can and then back down again usually hitting into the ground at the same speed. After hitting the ground or a object they will continue to try to move forward for another 2-3 kicks sort of ram-sliding themselves along the surface.
It's important to note that their small weight makes this slamming relatively harmless much like a person bumping into a wall while walking.
One other thing that could cause odd behavior would be some kind of disease but I highly doubt that is the case here.
Edit: Did not see that he died - it was probably erratic behavior as a result of being ill and or in unsuitable conditions, and or system shock.