No where in the regulations does it say you have to mount your anti-collision on the top of the aircraft. You certainly can, but not a requirement. Here is what part 107 says:
In order to fly at night "the small unmanned aircraft has to have lighted anti-collision lighting visible for at least 3 statute miles that has a flash rate sufficient to avoid a collision. The remote pilot in command may reduce the intensity of, but may not extinguish, the anti-collision lighting if he or she determines that, because of operating conditions, it would be in the interest of safety to do so."