It depends on state law. For example, in Oregon, the law requires "some sort of compensation". The law states:
"A final exception is when your rental unit is for sale. Your landlord may want frequent access to the unit to show it to prospective buyers. If the unit is on the market, you may agree to allow access to the landlord without requiring 24 hours notice. You must sign a written agreement that is separate from the rental agreement. That separate written agreement must provide you with some sort of compensation in exchange for the special access. And, of course, you do not have to agree to this type of arrangement at all."