So apparently it is possible to keep the processor going processing stuff while the screen is locked, as indicated here:
Running IPhone apps while in sleep mode
However, after testing with the example code, UIAccelerometer will just stop giving value as soon as the device is locked pronto. Is there a way to force otherwise?