The method I was taught was to wrap a well dampened towel around the offending article, crushing the sides down - and leave in a warm place (e.g. airing cupboard.) The damp gets into the cap, allows the material to be reshaped (like steam ironing) and evaporates leaving the cap and towel dry with the cap nicely crushed down at the sides.
Rumour has it that less traditional methods exist, such as using a bent coathanger pushed around the top rim and then formed into the desired shape...
What are you? Some kind of demented Guards type???
This is my method...get your cap, wet the top (like a beret) and wrap your stable belt round it, crusing the sides down nicely. You must be careful to have the belt shaping the cap properly so time spent here is not wasted!!! Proceed to leave it til it drys and HEY PRESTO! A nicely shaped cap.