I disasgree!
I see no way you can put the PIC to sleep and wake it up when it detects a shorter distance. It can not detect the distance while asleep.
Presumably you pulse the ultrasonic sound and time the echo to find the distance. The only way you can reduce consumption is to send the pulses less frequently and shut down unnecessary peripherals and pins between checks. You can speed it up again for a more responsive measurement if the distance increases. Be careful with the logic of it's operation though, bear in mind how it may be stored between uses and how this may decide whether it is in slow or fast mode.
A much better solution would be to use a timer to put it to sleep after a few seconds of use and wake it up again with an electrical signal from a button or tilt switch.
Brian.