Yes, it’s possible if the weather permits it. Also, the captain shall give his consent. Generally, during a charter week onboard, a motor boat of small size is allowed to stay only 2-3 days at anchor overnight. This is to guarantee proper rest for the crew and to safeguard the generators.
However, for yachts of medium and large size, this is not an issue.