If you can easily replicate the issue, a visit to the Apple GeniusBar should get you some options on what to do... there's a proximity sensor that might be bad...
Quit moving around so much. Lol but if you are not moving and its happening you may need to get a replacement as it appears the sensor may be going bad on your device.