The former Phish frontman was pulled over by an officer who saw his car failing to keep to right side of the road at about 3:30 a.m. Friday, Whitehall village police said.
A search turned up quantities of the painkillers hydrocodone and Percocet, as well as the anti-anxiety drug Xanax, that had been prescribed for someone else, police said.
The 42-year-old was released and scheduled for a court appearance at a later date.
"I feel terrible about what happened last night, and I am deeply sorry for any embarrassment I have caused my friends, family and fans," Anastasio said in a written statement.
Anastasio lives in Vermont and has been performing solo since Phish broke up in 2004.
The Phish tour was well-known for its active drug scene, and Anastasio said in a 2005 Associated Press interview that part of the reason he went solo was to escape that atmosphere.
Asked how sobriety had affected him, he said, "It affects you positively in every possible way that you can imagine, 'cause it's YOU. ... Any feeling you're trying to achieve using hard drugs you're gonna achieve through sobriety."