Hmmm. Well, there are a couple of solutions to that - first, a shorter-cabled circular needle might help - I think hats usually work best on 16" or shorter circulars, but don't quote me on that, because I'm a stubborn knitter who tends to make her hats flat and seam them up the back. LOL!
You could also transfer your hat to a set of 5 double-pointed needles in the appropriate size, which would mean that, even when you do the decreases for the top of the hat, you would not wind up having the same problem.
And if you are just stuck with a long circular needle (32 inches or more) and want to make a go of it with what you own - try looking at Amy's video here on knittinghelp about Magic Loop knitting.
Another last resort would be to find a different hat pattern that allows you to knit it flat, as the length of your cable wouldn't matter then.