Analysts said oil traders were taking an “optimistic view” that disruption in the region could soon ease.