My husband has been away for work since last thursday and his friend has been staying over every night since.
Why would your husband's friend stay over for that many nights?
It makes me feel less lonely when he's here and my husband is gone.
I know you feel lonely with your husband gone, but it may not be appropriate to have his friend stay over at your house for that many nights. Your husband may think there's an issue in your marriage and your cheating on him with his friend. Try to have him spend less time at your home while your husband is away.
I know my husband trust me, and I wouldn't cheat on him.
It's good that you guys trust each other, but you need to be conscientious of how your husband may feel if he finds out his friend is coming over. Maybe you should have a talk with your husband, just to make sure you're both on the same page.