  We develop technical tools that enable the use of Bellman functions for BMO
defined on $\alpha$-trees, which are structures that generalize dyadic
lattices. As applications, we prove the integral John--Nirenberg inequality and
an inequality relating $L^1$- and $L^2$-oscillations for BMO on $\alpha$-trees,
with explicit constants. When the tree in question is the collection of all
dyadic cubes in $\mathbb{R}^n,$ the inequalities proved are sharp. We also
reformulate the John--Nirenberg inequality for the continuous BMO in terms of
special martingales generated by BMO functions. The tools presented can be used
for any function class that corresponds to a non-convex Bellman domain.
