For lodging you have a few options.
This is the closest you can get to the start. There are 2 campgrounds nearby. Stockade Lake South Campground( off stockade Lake Drive and Stockade Lake North Campground(off Hwy 16A) Click the Link
Hotels/Motels are located in the town of Custer which is 6 miles West of the race start. Click the link and it will bring up a list you can chose from or google (Custer hotels SD)
Cabins aren't as close as tenting or using a camper but they're usually cheaper than hotels in Custer. Both tenting and cabins are located in Custer State Park.
4. Sleep In Your Car
This is the easiest and cheapest. There is a parking lot outside of the West park entrance. You can go to the parking lot on the left or the church parking lot.