Get Your Dog Care Questions Answered by Experts
I suggest doing your best to keep him quiet. No running around, definately no dog park, just outside on a leash to go potty and then back inside. If he's used to being in a kennel/crate, you can keep him in there in an effort to keep him from jumping up on couches or running up and down stairs.
If he seems especially painful, you can give one low dose or child's aspirin, but make sure you give it with some food to avoid stomach upset, and do not give more than one every 8-12 hours and do not give it for longer than 3 days.
If the leg still seems to get more painful, becomes swollen or if he is unable to bear weight on it, I suggest calling your vet or taking a trip the the nearest emergency vet and having them take a peek at it, just to rule out anything more serious than just a little sand spur injury.
I hope this helps