I would certainly not engage the tenants prior to closing, especially not without the seller's knowledge and consent (and any seller in their right mind would tell you "hell no"). The fact is, you do not own the property yet, and thus have no standing to negotiate with the tenants. There are dozens of reasons your transaction might not close, or might be delayed, and you'd only spook the tenants.
Worst case for the seller (and this happens all the time): The buyer scares off the tenants, then the deal falls through and the seller is left with an unwanted vacancy.
As to whether or when you can give the tenants notice of termination, or notice of a rent increase, it depends on three things:
1. What does state law say? Most states define month to month tenancies in statute, and specify how much notice either party must give the other (for example, in Florida, it's "15 days before the start of the next rental period" - which is a very short notice requirement).
2. What does the local municipality say? Even though our State law says 15 days as noted above, this is only in the absence of conflicting local ordinances. Many of our local cities actually require 60 days notice for rent increases or terminations (and some of these are recent, post-pandemic changes to local laws).
3. What does the lease say? Even if the lease is expired, it forms the basis of the tenant's month to month tenancy. If they lease requires 90 days notice (or whatever), that is generally what a judge is going to honor.
Our typical approach is to do nothing (other than communicating new payment instructions and contact info, obviously) immediately after closing, and give it a couple of months for the dust to settle and see if the tenant pays on time and maintains good communication, etc. If they do, then consider a phased in rent increase. If you tell them their rent is going up by $500, but it will be phased in over 5 or 10 months, they will either happily accept the new rent increase (because they already knew they were below market), or they will start making plans to vacate.
One thing I've learned is never terminate a good tenant just because you think they won't or can't tolerate a big rent increase. Often the tenant knows they don't have any better or cheaper options, and in the long run it's easier and cheaper for them to stay put than to move.
And vacancy and turnover costs will always be one of your biggest and most painful expenses as a landlord, and are often (not always) best avoided whenever possible. One exception would be if you are planning for a refinance down the road and need to renovate the units for appraisal purposes.