Being a good guest when you are invited to spend the night at someone's home is a must to ensure you are invited back and that you remain good friends with the host. Apartment Therapy's basic rules for being a good overnight guest will help you be sure you don't make any enemies when you spend the night.
First of all, make sure your plans are clear to your host and don't change them at the last minute. Tell your hosts exactly when you will arrive and when you will leave and stick to your dates. If your plans change, move to a hotel so you don't put your hosts' life into turmoil.
Keep your stuff neat. Even if you are staying in a bedroom that is specially designated for guests, make your bed daily and keep everything you've brought with you in a neat, orderly pile. Don't take over the bathroom with your toiletries, either, especially if it is shared with your hosts.
Take it upon yourself to help your host out with household chores. Take out the trash, wash the dishes, pick up more milk if you notice it's low, etc. Also, don't take advantage of your hosts' good graces. If you show up right before dinner unannounced, your hosts may have to sacrifice some of their food to share with you, which is just plain rude. You can even volunteer to pick up the ingredients for and make your hosts dinner one night as a thank you. Or take them out at the very least.
Finally, it always helps smooth things over if you give your host a gift. This can be something small, such as wine if you are having dinner together, or another small token if that is not the case. Follow up with a written thank you note when you get home to make sure your guest really knows how much you appreciate their kindness.