In older versions it used to be as easy as:
# ifconfig en0 ether xx:xx:xx:xx:xx:xx
For iOS versions >5 you have to resort to nvram:
# nvram wifiaddr=xx:xx:xx:xx:xx:xx
and then reboot the device.
Prerequisite: jailbroken device, terminal access (local or SSH) and sudo.