Yes, you can use the same NY.gov ID username and password to access services offered by both agencies.
What will I need to begin a MyDMV account?
The first thing you must have is your New York State drivers license or permit.