There are soooooo many things that could cause a chameleon to be restless in their cage and try to escape. Here are just some:
Something is they can see is frightening them,
HE might be a SHE and getting ready to lay eggs,
the chameleon might be hungry,
the cage might be much too small or sparsely furnished or furnished in the wrong places,
the temps might be wrong,
s/he might be looking for a mate,
you might have a chameleon that is not coping with confinement/captivity.
The list is endless.
Can you give us a bit more information on your chameleon and his set up? Pictures always help.