Could be something as simple as he slipped and pulled a muscle by himself while playing
Honestly this could be for a variety of reasons. Sometimes things happen, as BryanRoof mentioned above, and it is so traumatic that it changes the way dogs act. A slip and fall seems like a good possibility, but trying to reintroduce your dog to other surfaces might be the way to go. Try to coax them off the carpet by sitting on the hardwood so they see there isn't something to be frightened of, then once they come over lots of love and praise so repeat the action. It may take some time, as I have found from experience. There was an incident at our house when the pups were just babies where a gate keeping them out of a bedroom fell over and made a loud crashing noise that just terrified one of my girls. Every time after that when she saw the gate she would bark like crazy, or if you moved it and she could hear it that trigger her too. So it took a few months of working with her, by sitting with the gate and her and reintroducing it as something that wouldn't hurt her. It eventually worked, but I kid you not she still mean mugs it and makes a little grumble at it when she walks by it, even though we haven't used it in over a year.
When dogs can scavenge for their food it helps them build up confidence. Throw small pieces of a yummy treat, like hotdog or cheese, and have your lab search out the pieces in the area she is afraid to go on. Eventually she will get over her fear.