Is he neutered? Un-neutered rabbits usually spray as a form of showing dominance/possession/marking. Neutering should help this problem.
In the mean time, try saying “NO” firmly and loudly. You could try a spritzing him with water from a spray bottle as your say No to deter that behavior too. Or, pick him up and put him back in his cage for a “time-out.” He should figure out that when he pees everywhere he doesn’t get to play any more. Of course, let him out again later, since buns do need a few hours out of the cage every day for exercise.
Anyone else have any suggestions on how to fix this problem? I’ve never actually tried the disciplining methods I described about… just a firm “no” with my bun does the trick.
Good luck!
Also, it looks like this is your first post and you’re new here. Welcome! When you have time, head over the the Welcome section and introduce yourself and your bun! Pictures are always good too!