How do I join a custom game from spectator mode?
In short, there is no way other than leaving and re-joining, without the custom game moderator (lobby owner) changing you from a spectator in the lobby, so ask in match chat to be moved by the game owner or PM the owner.