Mobile Edge Clouds (MECs) are emerging as a key complement to centralized cloud infrastructures by bringing computing and storage resources closer to the network edge, thereby reducing network bandwidth, latency, and jitter. A critical challenge in leveraging MECs effectively is the application placement problem, which seeks to minimize operational costs while ensuring end-user Quality of Service (QoS). This problem is further complicated by user mobility, as applications must migrate to maintain optimal QoS, yet frequent migrations can lead to unnecessary bandwidth consumption due to state transfer. In this paper, we tackle the application placement problem for stateful applications in MEC environments. We model the dynamic workloads, applications, and infrastructure typical of MECs and define the associated costs: resource utilization, migration, and QoS degradation. Based on this model, we propose two online placement algorithms – Gale-Shapley-based and Follow-me – designed to minimize the total cost of operating applications. These algorithms are compared against an offline benchmark that has complete future knowledge. Experimental results demonstrate that both proposed algorithms efficiently place applications in MECs, achieving operating costs within 8% of the global optimum approximated by the offline algorithm. Furthermore, the Gale-Shapley-based algorithm outperforms the Follow-me algorithm, reducing operating costs by up to 17% and improving load balancing across MECs to mitigate resource scarcity.