Belarusian Azarenka is appearing in her first major since the 2016 French Open and it would have been a short stay had she not rallied from one-set down to dispatch Cici Bellis 3-6 6-2 6-1 in one hour and 45 minutes.
Ostapenko looked set to cruise into the second round when she bagelled Sasnovich in the opening set, but she won just one of the next seven games before completing a 6-0 1-6 6-3 victory on Court 18.
There were wins for former champions Petra Kvitova and Venus Williams, while Simona Halep, Elina Svitolina, Johanna Konta, Dominika Cibulkova and Madison Keys were among the other seeds to make it through.
Former Wimbledon finalists Sabine Lisicki and Eugenie Bouchard fell at the first hurdle against Ana Konjuh and Carla Suarez Navarro respectively.
Five-time champion Venus Williams came through her first-round match against Elise Mertens, prevailing 7-6 (9-7) 6-4, before she was faced with an unusual line of questioning.
Williams started the match wearing a pink bra, but confirmed in her post-match media conference that she was asked to change it during a rain break as it contravened the All England Club's 'all-white' rule.
"What pink bra? I don't like talking about bras in press conferences. It's weird," came the terse response. "I don't want to talk about undergarments. It's kind of awkward for me. I'll leave that to you. You can talk about it with your friends. I'm going to pass."