Two ways, depending on your rig.
At a hotel: look for the green "H" in a box on the map. Choose how long you want to sleep, then hit Advance Time. Expect to pay somewhere in the range of $50 to $150 depending on the establishment.
In your own truck: if you own a sleeper cab, press N to open the notebook, select Advance Time, and rest without the hotel bill.