Yes, if you have decided to get married after you entered the US on the VWP, you can get married and file for AOS ; however you should not do so within 90 days of your entry but wait until that period is over or almost over and file then.  Please let me know if you have any additional questions or need assistance in connection with this matter.