Rest stops are free if you do not set up a tent.

Ive rolled out my sleeping bag and mattress at rest stops in Iowa a couple times. Even slept up at the restrooms.

Plenty of nice mom and pop motels in SD, WY, & MT. If your in the southern part of SD Id stay at the Warrior Inn in Winner SD. Isabel is a great lady and theres a bar inside the motel. Its the last place to stay before you reach Rapid City, 250 miles.
Point your tent door to the south to avoid filling it up with rain.
Also will be some chilly nights there in June.
Id carry a side arm in YS.